0

I want to log Outgoing (SOAP) messages generated by Web service in response of request sent by client (on server side).

Using Service model clients are able to log the response into the database by applying settings into the web.config of the web application e.g.

< system.servicemodel >

    < extensions>

       < behaviors>

    < bindings> ...

Please guide me how to achieve logging and configuration on server side.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Xprt
  • 1
  • 5

1 Answers1

1

You can enable diagnostic tracing :

Just need to add a section in web.config -

  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel"
              switchValue="Information, ActivityTracing"
              propagateActivity="true">
        <listeners>
          <add name="traceListener"
              type="System.Diagnostics.XmlWriterTraceListener"
              initializeData= "F:\Sony\Traces.svclog" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>

http://sonyarouje.com/2011/11/10/diagnostic-trace-svclog-configuration-for-wcf/

http://msdn.microsoft.com/en-us/library/ms732023.aspx

Also check this related question How to turn on WCF tracing?

To see the actual SOAP envelope that is passed around http://litemedia.info/debug-soap-request-and-response-in-wcf

Also found one more similar question How can I enable WCF logging so that it writes to a Database?

Community
  • 1
  • 1
Amitd
  • 4,769
  • 8
  • 56
  • 82