How to mix Forms Authentication and Windows Authentication in MVC 2 in IIS 7.5

forms-authenticationiis-7model-view-controllerwindows-authentication

I've seen this posted alot that solves the problem if you are running ASP.Net application not a MVC 2 one in IIS 7.5. Would the same solution work using location in the web.config and 2 seperate login pages like it does for asp.net? Do you need to register a new route to do that?

I know it would work with 2 seperate applications in IIS, but i want them all in the same application. Any ideas?

Solutions for asp.net

Best Answer

It looks like you can use the following solution.

But i had to create a ASP.net page inside my MVC solution that gets hit directly to handle the Windows Authentication then redirects to the mvc site. The location section inside of the web.config should work then since it's not relying on the routing.