Search code examples
asp.netwindows-authenticationasp.net-identity

ASP.Net Identity - Multiple Authentication Methods


Is it possible to configure the new ASP.Net Identity system to support multiple authentication methods?

I have a requirement to support both Windows authentication (Intranet) and application level users (ideally using the Entity Framework option). This seems to be almost impossible in the old ASP.Net Membership world but has anything changed with the new OWIN based implementation?

I need a scenario where Windows Auth is attempted first and then, if it fails, the site falls back to application level authentication.

As a secondary question, how do you go about adding the Entity Framework tables to support this to an existing database in an app that is using Database First?


Solution

  • I need a scenario where Windows Auth is attempted first and then, if it fails, the site falls back to application level authentication.

    Add a project for each type of authentication.

    As a secondary question, how do you go about adding the Entity Framework tables to support this to an existing database in an app that is using Database First?

    Entity Framework will handle this for you when you upload your site to the server. Just use multiple DbContext. They don't have to be part of the same table as long as you reference them correctly.