1

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?

Keith Jackson
  • 3,078
  • 4
  • 38
  • 66

2 Answers2

0

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.

stink
  • 865
  • 8
  • 19
  • I had proposed a solution involving a second site for intranet users with a temporary secure key and redirect between them, but I was hoping for something that would mean I didn't have to do this. The app will be deployed at multiple clients so I'm looking to minimise the setup and configuration needed on that side. – Keith Jackson Dec 04 '13 at 09:20
  • In regard to the second part, the existing elements use the Legacy ObjectContext so the Contexts would be different anyway, which should keep them quite isolated. – Keith Jackson Dec 04 '13 at 09:21
0

To answer your second question. Go to the connection string. Find the location of the DB context and import it to your DB.