It started simple, with the idea of moving a site from Azure Cloud Services to Azure Websites since Azure Websites had all the things the site needed. Well, almost… The site used Azure Access Control Services to do authentication of users and one of the blockers we hit early in the conversation process was how WIF handled the default cookie protection using DPAPI. DPAPI isn’t available for Azure Websites so it throws some nice errors.
Vittorio has a great blog (as usual) here that talks about how you can swap out the security token handlers to ones that will work with Azure Websites. The only catch is they are only supported in .NET 4.5 and there isn’t an equivalent for .NET 4.0/WIF 1.0 without building it.
So that seemed like an easy choice as we wanted to move it to the current .NET release anyway so we made the move to .NET 4.5. The next catch is a lot of the WIF namespaces change to System.Identity* and so does all the configuration details. Some of the classes are no longer used or renamed. A good place to start in your journey is here http://msdn.microsoft.com/en-us/library/jj157089.aspx that describes the changes required for WIF 4.5.
Most of the code changes go pretty quick. Where it got tricky was the configuration file changes. I wasn’t able to find a great example showing the detail steps of migrating the configuration. Visual Studio 2013 has some great tooling for identity, but it doesn’t support ACS since ACS is being rolled into Azure AD in the future. In the mean time that leaves VS 2013 without tooling supporting ACS. VS 2012 has tooling via the Identity and Access Tool. Since we were already in VS2013 and still wanted to use the tool we created a empty ASP.NET application in VS2012 and ran the tool to setup the configuration file. The we copied that configuration back to the existing project. One thing to be aware of make sure the project you use with the tool in VS 2012 is .NET 4.5 and not .NET 4.51 or the tool won’t show on the context menu for the project.
Hopefully this might help someone else moving to the latest with WIF and ACS.