Asp.Net Windows authentication and forms authentication

3

The idea or requirement is to have an application which can work with Windows and forms authentication at the same time.

  • If the user who tries to access the application has domain credentials (intranet) then the application will grant access through Windows authentication.

  • Otherwise the application displays a login using forms authentication.

Is it possible to do this?

    
asked by luis.alvarado 20.02.2016 в 20:50
source

1 answer

1

What I would recommend is that you create two websites in the IIS

  • one with integrated security with windows
  • the other one securely forms asp.net

Then the user enters the first site, if authentication passes because you can detect in the Application_AuthenticateRequest that is a valid user of the domain then enter.

Now if you can not authenticate redirects to the other site that requests login through username and password.

ASP.NET Mixed Mode Authentication

IIS7 Mixed Windows and Forms Authentication

    
answered by 20.02.2016 в 21:49