J
Julian Mensch
So, we are developing a client that consumes 3rd-party web services
using the .NET Framework in the v2.0 (Add Web Reference..., i.e., non-
WCF) method, and we've run into a thorny issue.
When there is some problem with the service host, instead of sending
back an XML response message, it will in some situations send back
an HTML error (for example, a "401 Unauthorized" page). Obviously, to
aid troubleshooting and convey meaningful errors back to the user, we
need to be able to capture this HTML so we know what went wrong.
The .NET Framework generates an error message that says "Client
found
response content type of 'text/html', but expected 'text/xml'.", but I
can't
seem to see what the 'text/html' content is. We need this for
troubleshooting
and to understand why the web service is rejecting our connection
attempts.
To doubly complicate this, the connection uses SSL, so we can't even
use
a packet sniffer to view the response -- it's all encrypted.
Can anyone tell me what API call or object property I can use to
view this
response message to a web service call from a standard VS2008-
generated
proxy class file?
-- Julian Mensch
using the .NET Framework in the v2.0 (Add Web Reference..., i.e., non-
WCF) method, and we've run into a thorny issue.
When there is some problem with the service host, instead of sending
back an XML response message, it will in some situations send back
an HTML error (for example, a "401 Unauthorized" page). Obviously, to
aid troubleshooting and convey meaningful errors back to the user, we
need to be able to capture this HTML so we know what went wrong.
The .NET Framework generates an error message that says "Client
found
response content type of 'text/html', but expected 'text/xml'.", but I
can't
seem to see what the 'text/html' content is. We need this for
troubleshooting
and to understand why the web service is rejecting our connection
attempts.
To doubly complicate this, the connection uses SSL, so we can't even
use
a packet sniffer to view the response -- it's all encrypted.
Can anyone tell me what API call or object property I can use to
view this
response message to a web service call from a standard VS2008-
generated
proxy class file?
-- Julian Mensch