Reputation: 2398
I have an azure web app built with C# and utilizing OWIN for google and facebook authentication. Recently, I upgraded OWIN from 3.0.1 to 3.1.0 for facebook, but now the google authentication seems to randomly lose its marbles; it works fine for a long while but then starts rejecting everyone with "access_denied". A restart fixes it, but that is obviously not a long term fix.
I was trying to find a way to get some logging information about OWIN to track down the issue and try to identify any triggers. I found instructions at http://benfoster.io/blog/how-to-use-tracesource-with-azure-diagnostics and tried to implement them, but I'm still am not seeing any logs.
My configuration looks like this:
<system.diagnostics>
<sharedListeners>
<add name="AzureDriveTraceListener" type="Microsoft.WindowsAzure.WebSites.Diagnostics.AzureDriveTraceListener, Microsoft.WindowsAzure.WebSites.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</sharedListeners>
<sources>
<source name="Microsoft.Owin" switchName="Microsoft.Owin" switchType="System.Diagnostics.SourceSwitch">
<listeners>
<add name="AzureDriveTraceListener" />
</listeners>
</source>
</sources>
<switches>
<add name="Microsoft.Owin" value="All" />
</switches>
<trace autoflush="true" indentsize="4" />
</system.diagnostics>
Am i missing something? Any help would be appreciated!
Upvotes: 0
Views: 302
Reputation: 3030
It is probably a silly thing, but I see that you are using the same public key from the blog.
PublicKeyToken=31bf3856ad364e35
Perhaps that is the problem. In addition to that, if you are doing it for the first time
https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-enable-diagnostic-log
If you follow this one, it would be easier for us to help because except for the public key, you seem to following everything the blog from benfoster says to the dot.
Upvotes: 1