AD FS 2.0 uses Event Tracing for Windows (ETW) for debug logging.
Example of <system.diagnostics> section with verbose logging and all output options enabled:
<system.diagnostics> <sources> <!-- To enable WIF tracing, change the switchValue below to desired trace level - Verbose, Information, Warning, Error, Critical --> <!-- Set TraceOutputOptions as comma separated value of the following; ProcessId ThreadId CallStack. Specify None to not include any of the optional data--> <!-- NOTE THAT THE CHANGES TO THIS SECTION REQUIRES SERVICE RESTART TO TAKE EFFECT --> <source name="Microsoft.IdentityModel" switchValue="Verbose"> <listeners> <add name="ADFSWifListener" traceOutputOptions="ProcessId,ThreadId,Callstack" initializeData="Wif" type="Microsoft.IdentityServer.Diagnostics.ADFSTraceListener,Microsoft.IdentityServer,Version=6.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> </listeners> </source> <!-- To enable WCF tracing, change the switchValue below to desired trace level - Verbose, Information, Warning, Error, Critical --> <source name="System.ServiceModel" switchValue="Verbose" > <listeners> <add name="ADFSWcfListener" traceOutputOptions="ProcessId,ThreadId,Callstack" initializeData="Wcf" type="Microsoft.IdentityServer.Diagnostics.ADFSTraceListener,Microsoft.IdentityServer,Version=6.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> </listeners> </source> </sources> <trace autoflush="true" ></trace> </system.diagnostics>
nzpcmad1 edited Revision 9. Comment: Using wevtutil.exe throws error "Too many arguments are specified.". Drop the .exe part
Lars Wilhelmsen edited Revision 7. Comment: sl argument of wevtutil.exe must be lower case
On "Server 2008 R2":
1. If you run "wevtutil ..." from a command ("cmd.exe") window, you will get:
Too many arguments are specified. The parameter is incorrect."
If you run it from PowerShell, however, it will work.
2. You *MUST* have the ADFS debug log disabled *BEFORE* running the "wevtutil ..." command or you will get:
... The channel must first be disabled before performing the requested operation.
So make sure you perform the steps in order, and disable the channel once you've finished collecting debug logs.