2
votes

I'm currently underway in migrating a collection of ASP.Net web forms projects to ASP.Net MVC 5. The web forms projects are all hosted on the same machine and share forms authentication (You log into one, you're logged into them all). The old apps use Page.User.Identity. As a first step I'm migrating just one site to MVC 5 using UserManager/IAuthenticationManager with cookies. As expected, this new authentication system does not work with the other apps in our environment. The MVC5 project has the same machineKey configuration as the other projects and I've tried adding a call to FormsAuthentication.SetAuthCookie but it does not work. How can I setup authentication to work across both types of environments using the newer authentication scheme but with minimal changes to the old projects to make this work?

1

1 Answers

0
votes

I'm not 100% sure because this project ended up going a very different direction, but we encountered similar problems with web forms cookies. The solution was to set the compatibilityMode property on the machine key to "Framework45". This all systems configured this way to see the same cookie and behave as intended. I would be willing to bet that this would have solved my original problem.