Tuesday, May 10, 2011

WCF debugging

Came accross this page while I was having problems getting a WCF connectivity to work:

Basically, when you want to trace the WCF communication, this is the way to go. Just add this to your app.config and an svctrace file will be created:



  <system.diagnostics>


    <trace autoflush="true" />


    <sources>


      <source name="System.ServiceModel"


              switchValue="Information, ActivityTracing"


              propagateActivity="true">


        <listeners>


          <add name="wcfTraceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="WcfTrace.svclog" />


        </listeners>


      </source>


    </sources>


  </system.diagnostics>