Absolute Thoughts....

  Home  |   Contact  |   Syndication    |   Login
  9 Posts | 0 Stories | 12 Comments | 0 Trackbacks

News

Archives

Have you ever gotten errors when working with WCF services?

  1. Open up your web.config/app.config on the server side and add the following

    <system.diagnostics>
     <!-- This logging is great when WCF does not work. -->
     <sources>
      <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
       <listeners>
        <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData= "c:\traces.svclog" />
       </listeners>
      </source>
     </sources>
    </system.diagnostics>
  2. A file called traces.svclog will be stored on your harddrive. This will contain the the error message that you're looking for. All you now need is the right tool to open it up. It is calledsvctraceviewer.exe and usually resides in the folder C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin. If you don't have this folder or anything like it, you go download the Microsoft Windows SDK from here.
  3. Now you can open your log and look for the error that is thrown. There you will find a detailed stacktrace of what's wrong.


posted on Friday, May 18, 2012 8:24 PM