Reputation: 798
Is there a way to retrieving parameter names and values passed to a web method from Request object? I've read somewhere that you need extra code to access the soap body. Any known workarounds to be able to see the soap body from Application_BeginRequest? Thanks!
Upvotes: 0
Views: 1202
Reputation: 21
If these events fired in this case you can read the xml content of the request by calling :
Request.InputStream.Read(...);
and then :
Request.InputStream.Seek(0, SeekOrigin.Begin);
to reset the InputStream location.
Upvotes: 2
Reputation: 161801
ASMX web services do not use the full ASP.NET pipeline. I don't believe that these two events even fire for a web service.
To access the SOAP data stream, you want to implement a SoapExtension.
Of course, I should also take this opportunity to remind readers that Microsoft now considers ASMX web services to be a "legacy technology". They suggest that all new web service development should use WCF.
Upvotes: 1