dave
dave

Reputation: 1430

Moving past an Server 500 Error

How do I deal with the following situation? I am posting an Soap Envelope and am writing some error handling. Basically if an incorrect request is made to the server then it returns the error in xml format but also reports as an 500 error in the headers.

In vb.net how do I get to the XML in the error? I am requesting the response by creating a new XmlDocument and then using the LoadXml function.

Using a try/catch I can only access the 500 error and not the xml response which is sent.

Upvotes: 0

Views: 33

Answers (1)

dave
dave

Reputation: 1430

Using the post here WebClient: Ignore HTTP 500 I have managed to solve it.

Essentially in the try/catch, you need to return the exception type WebException

Upvotes: 1

Related Questions