After configuring my ASP.NET MVC application to use WSFederation with WIF, I was finally ready to run the app the first time. However instead of redirecting me to the configured STS and showing me a login page I ended up with a 401 Unauthorized error page.
I first thought that the required HTTP modules were missing, but no they were there:
Let’s have a look at the WIF configuration:
There is definetely something wrong here, but I had a hard time figuring out what. The problem is related to the passiveRedirectEnabled configuration setting. If you set passiveRedirectEnabled to false, WIF will no longer be responsible for the redirections to your issuers.
That explained a lot! Switching the setting to true solved my issue and I was finally welcomed by my STS login page…