I\'m trying to put together FederatedAuthentication with .NET 4.5, MVC 4, and active redirect using a custom server-side login page, using code from this tutorial, and from
I managed to fix this myself, and since there are a few unanswered questions similar to this on SO, I'll leave the question up and post my own answer.
The issue is to do with upgrading the MVC application to .NET 4.5. Much of the WIF functionality remains the same (at least on the surface), but the classes have all moved to different assemblies. I fixed my problem following the migration guidelines here: http://msdn.microsoft.com/en-us/library/jj157089.aspx
The most important thing is to remove old references to the Microsoft.IdentityModel
package (v 3.5.0) and make sure they are replaced by similar references to the System.IdentityModel
and System.IdentityModel.Services
dlls, which should be version 4.0, and come from the GAC rather than an external package.
My steps to fix were:
Microsoft.IdentityModel
package and de-reference the dllSystem.IdentityModel.Services.WSFederationAuthenticationModule
reference from
in
And this got the original WIF3.5 / MVC3 Code Sample working under.NET 4.5