1

I have forms authentication already built in my web application. Can I have Windows authentication and forms authentication in the same application. So first authentication is tried using Windows authentication and if it fails then it is done using Forms authentication.

1

1 Answer 1

5

Its possible - exact mechanism would depends upon where your user store is located at - for example, let's say you have your own users table in the database that you are using for doing Forms authentication. In such case, you can offer windows authentication by mapping your user to the windows user(s) - it can be as simple as maintaining a column in the users table.

Basic idea is to to configure ASP.NET to use forms authentication - the login page uses windows authentication and if user is authenticated then do not display login-form. See this link for more info: http://mvolo.com/iis-70-twolevel-authentication-with-forms-authentication-and-windows-authentication/

On related note, see this SO question: Mixing Forms authentication with Windows authentication

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.