WIF(Windows Identity Foundation) is not the most easy framework to use. The moment something goes wrong it’s not always transparent what actually happened leaving you no clue where to search for the root cause.
Luckily Microsoft integrated great tracing functionality so you can have a look under the hood. To enable tracing, add the following configuration to your app.config/web.config file:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<system.diagnostics> | |
<sources> | |
<source name="System.IdentityModel" switchValue="Verbose"> | |
<listeners> | |
<add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="WIF.svclog" /> | |
</listeners> | |
</source> | |
</sources> | |
<trace autoflush="true" /> | |
</system.diagnostics> |
Tracing information will be written to a file in XML format. However you can use the SVCTraceViewer tool to open and read the trace messages in a more user-friendly format.