Mahmoud Samy
Mahmoud Samy

Reputation: 2852

How to turn on WCF tracing at the client side?

I want to use the WCF tracing feature. Here I found a help to turn on the WCF tracing at the service side.

Now I want to enable the WCF tracing feature at the client side for a WCF service that I can consume only.

Upvotes: 4

Views: 13693

Answers (2)

Dude Pascalou
Dude Pascalou

Reputation: 3171

It's the same as the server side : add this section in your client's config file (web or app) :

<configuration>
  <system.di​agnostics​>
    <sources>
      <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
        <listeners>
          <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData= "C:\LogFolder\LogFile.svclog" />
        </listeners>
      </source>
    </sources>
    <trace autoflush="true" />
  </system.diagnostics>
</configuration>

Upvotes: 4

Related Questions