Thursday, April 16, 2015

WIF–OWIN error: A default value for SignInAsAuthenticationType was not found in IAppBuilder Properties.

I’m in the middle of switching between the ASP.NET WIF implementation and the OWIN WIF implementation. I had some unexpected issues, but the positive thing is I learned a lot about WIF and OWIN Glimlach.

One of the issues I encountered was the following error message:

“A default value for SignInAsAuthenticationType was not found in IAppBuilder Properties. This can happen if your authentication middleware are added in the wrong order, or if one is missing.”

image

Fixing it is a one-liner:

app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);

2 comments:

Anonymous said...

Thank you..it worked for me

Anonymous said...

But where to put that line???