4
I would like to log all Soap requests exactly as they arrived on my server. There is a way this can be done via c#?
4
I would like to log all Soap requests exactly as they arrived on my server. There is a way this can be done via c#?
3
I found this link https://msdn.microsoft.com/en-us/library/system.web.services.protocols.soapextension.aspx?f=255&MSPPError=-2147217396
No webmethod would look like this:
[WebMethod]
[TraceExtensionAttribute]
public Type MethodName()
Solved my problem as I couldn’t find a tracing option that would store the full xml of the request.
Grateful to all who helped me.
1
An alternative is to enable tracing your application. Add to file .config
of your Web Service the following:
<system.diagnostics>
<trace autoflush="true" />
<sources>
<source name="System.Web.Services.Asmx">
<listeners>
<add name="AsmxTraceFile" type="System.Diagnostics.TextWriterTraceListener" initializeData="local.log" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId" />
</listeners>
</source>
</sources>
<switches>
<add name="System.Web.Services.Asmx" value="Verbose" />
</switches>
</system.diagnostics>
Furthermore, it is possible to use dependency injection to intercept calls to the Web Service. This can be done by generating an access layer proxy. The explanation is here.
But the xml of the request does not come in the case of tracing right? I would like the full xml for my client to verify that who is calling erroneously the webservice is it.
It is to come yes. The tracing includes serialization and deserialization information.
Browser other questions tagged c# soap
You are not signed in. Login or sign up in order to post.
ASP.NET Web Services (ASMX) to WCF?
– Tobias Mesquita
We use ASMX for these webservices
– Jackfowl