Wednesday, August 03, 2011

WIF : Displaying WIF trace files


Trace or log files are very useful to help you find problems with WIF.

I normally add the following to the end of the web.config.

      <source name="Microsoft.IdentityModel" switchValue="Verbose">
          <add name="xml" type="System.Diagnostics.XmlWriterTraceListener"
               initializeData="xxx\Logs\WIF.xml" />
    <trace autoflush="true" />


This produces a ton of output in XML format but it's not that easy to read it!

The trick is to use the Service Trace Viewer Tool.

See Examining WCF Diagnostic Traces Using Service Trace Viewer Tool for download instructions.

Run up the tool (you may need to run as administrator), then File / Open with the file type set to XML and you'll find it so much easier!


No comments: