How to diagnose bad SOAP requests to ASP.NET Web Service

P

Peter Kron

We occasionally get reports of failures where the client of a webservice
receives a SOAP exception, such as:
"Server was unable to read request. --> There is an error in XML document
(1, 1021). --> The '<' character, hexadecimal value 0x3C, cannot be included
in a name. Line 1, position 1025."

It appears to be a problem with the client, but we don't control that
environment. Is there an appropriate place to trap this exception on the
server, so we can see the SOAP request causing this error? It never gets to
a web method, so perhaps there is something that can be done in global.asax?

Thanks
Peter Kron
 
S

Stephen Ahn

Peter,

You can use a SoapExtension to log SOAP requests on the server.
If you look up "SoapExtension" in VS.NET help, there's code
for an example class called TraceExtension, which will
log SOAP requests. I'm not sure how you could selectively
log only those SOAP requests which are causing exceptions,
though.

HTH,
Stephen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top