-
Notifications
You must be signed in to change notification settings - Fork 82
Troubleshooting
If you are having problems authenticating with a provider, using the baked in Tracing code to view what is happening under the hood!
NOTE 1: Tracing exists only for the CORE providers and the MVC pacakge. Not yet for Nancy module (package) or the extra providers. A such, this is all based upon this sample Mvc website.
First up, create your website with the buttons, etc.
Next, o) Install the core package and MVC package. eg.
Install-Package SimpleAuthentication.Mvc
(that will install both CORE and MVC).
o) Install the glimpse plugins :) This makes it easy to see what is happening under the hood. eg.
Install-Package Glimpse.Mvc4
Install-Package Glimpse.SimpleAuthentication
o) Finally, add some tracing settings to your website. Lets just see everything right now. Edit your web.config
by adding this:
<configuration>
...
<system.diagnostics configSource="system.diagnostics.config" />
...
</configuration>
then add the following new file next to the web.config: system.diagnostics.config
and stick this into it...
<?xml version="1.0" encoding="utf-8"?>
<system.diagnostics>
<sharedListeners>
<add name="GlimpseListener" type="Glimpse.Core.TraceListener, Glimpse.Core" />
</sharedListeners>
<!-- Main authentication service -->
<sources>
<source name="WD.Web.Authentication.AuthenticationService" switchValue="Verbose">
<listeners>
<clear />
<add name="GlimpseListener">
<filter type="*" />
</add>
</listeners>
</source>
<!-- Specific Providers -->
<source name="WD.Web.Authentication.Providers.Facebook" switchValue="Verbose">
<listeners>
<clear />
<add name="GlimpseListener">
<filter type="*" />
</add>
</listeners>
</source>
<source name="WD.Web.Authentication.Providers.Google" switchValue="Verbose">
<listeners>
<clear />
<add name="GlimpseListener">
<filter type="*" />
</add>
</listeners>
</source>
<source name="WD.Web.Authentication.Providers.Twitter" switchValue="Verbose">
<listeners>
<clear />
<add name="GlimpseListener">
<filter type="*" />
</add>
</listeners>
</source>
<source name="WD.Web.Authentication.Providers.WindowsLive" switchValue="Verbose">
<listeners>
<clear />
<add name="GlimpseListener">
<filter type="*" />
</add>
</listeners>
</source>
<!-- Mvc controllers -->
<source name="WD.Web.Authentication.Mvc.WorldDominationAuthenticationController" switchValue="Verbose">
<listeners>
<clear />
<add name="GlimpseListener">
<filter type="*" />
</add>
</listeners>
</source>
<source name="WD.Sample.MvcAuto.Controllers.HomeController" switchValue="Verbose">
<listeners>
<clear />
<add name="GlimpseListener">
<filter type="*" />
</add>
</listeners>
</source>
</sources>
</system.diagnostics>
That's it! Create your normal login buttons and you should now see some tracing data.
DON'T FORGET TO TURN ON THE GLIMPSE GUI SO YOU CAN SEE STUFF! => goto localhost:port/glimpse.axd to see the option to turn glimpse ON or OFF
- NancyFX Manual Setup
- NancyFX Automatic Setup
- MVC Manual Setup
- MVC Automatic Setup
- web.config
- global.asax
- bootstrapper