I am experiencing an intermittent problem between my application, Identity Server, and the Microsoft.OWIN layer. The issue is probably something I am doing wrong, but may actually be a bug in Microsoft.OWIN. In order to better understand the root cause of the problem, I am trying to turn on logging in the OWIN layer.
I followed this post by Tugberk Ugurlu, but nothing ever gets written to the log file.
Here is my web.config file entry.
<system.diagnostics>
<switches>
<add name="Microsoft.Owin" value="4" />
</switches>
<trace autoflush="true" />
<sharedListeners>
<add name="file" type="System.Diagnostics.TextWriterTraceListener" initializeData="OWINtrace.log" />
</sharedListeners>
<sources>
<source name="Microsoft.Owin" switchName="Microsoft.Owin" switchType="System.Diagnostics.SourceSwitch">
<listeners>
<add name="file" />
</listeners>
</source>
</sources>
</system.diagnostics>
What am I doing wrong?