function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Response is not well-formed XML.



I have such error during getting response:  '', hexadecimal value 0x1F, is an invalid character. Line 1, position  

I've had this error.But it was caused by invalid login and password. Now these parameters are ok.

About a week ago it worked good. 


This error occurs here:


public override WebResponse GetResponse()


return new GzipWebResponse(wr.GetResponse ());



I use Gaiaware library. 



Does anybody know what this error caused by ? 




Message Edited by Getlin on 01-05-2010 02:04 AM
Message Edited by Getlin on 01-05-2010 02:04 AM


when you call  your method on the service like so ...




wrap it up in a try catch.

Then when the code fails it will stop on that line you posted.

push F10 to step to the next line and it will step in to your catch block giving you the actual error causing your headache.








catch(Exception ex) <-- F10 should step you here


       throw ex;   <-- pressing it a second time will step you here, at this point you have a meaningful exception object to examine.




Took me ages to figure that one out !!!


Thanks for your responce! Actually this is not a problem to catch this exception. 

But why Salesforce sends such uninformative response. Actually one of the possible reason to give this response is to use invalid 




What I was getting at is that within the Catch block by examining "ex.Message" you would be told that (if the problem was indeed that).


My point being, SF doesn't really give an "Un-informative response" it's simply reporting it in a way that isn't aprticularly handled well by .Net


Yes you are right. I'll check it.

Thank you!


Hi Paul,


I've debugged this situation and got such message - The remote server returned an error: (500) Internal Server Error. This error is related to invalid credentials for login.I don't think that this message is informative.