brockallen / BrockAllen.MembershipReboot

MembershipReboot is a user identity management and authentication library.
Other
742 stars 238 forks source link

Getting exception 'SessionAuthenticationModule is not configured and it needs to be.' #609

Closed rtassarone closed 8 years ago

rtassarone commented 8 years ago

I'm getting the exception 'SessionAuthenticationModule is not configured and it needs to be.' upon execution of authSvc.SignIn (screenshot attached).

Looking at the source at https://github.com/brockallen/BrockAllen.MembershipReboot/blob/master/src/BrockAllen.MembershipReboot.WebHost/SamAuthenticationService.cs I see that this exception is thrown when sam is null in:

var sam = FederatedAuthentication.SessionAuthenticationModule; if (sam == null) // throw...

The only answer I've seen when Googling is to change from IIS Express (Cassini) to full IIS which seems to not address the issue, not to mention that I tried that and got the same failure. Any ideas?

image

brockallen commented 8 years ago

You need to register the SAM http module like this: https://github.com/brockallen/BrockAllen.MembershipReboot/blob/master/samples/SingleTenant/SingleTenantWebApp/Web.config#L69

rtassarone commented 8 years ago

Terrific thank you Brock...