Is there a good approach for combining Windows authentication and form authentication in ASP.NET MVC?

I have a scenario where some users will be required to register with the application (forms authentication), while others will be authenticated through Windows authentication. To determine if a user needs to log in, I will look for permissions for users of the AD window using a special role / permission implementation.

In ASP.NET MVC, you can configure the authentication configuration to "Windows" or "Form Authentication." I know that this can be done by creating two applications, but I do not like this option

I'm going to try to convince my boss that getting everyone to log in will make our life a lot easier, but I thought it was best to check if there were any good options. I could not find one possible solution for ASP.NET MVC. I am using version 2.

Any ideas?

+5
source share
1 answer

You need to remember that ASP.NET MVC is built directly on top of the ASP.NET runtime, so you can access the basic functions, and web.config still works the same as it does for WebForms.

IIS 7.0 Windows" , , , HttpModule FormsAuthentication.

, , ASP.NET MVC.

+2

All Articles