Reputation: 690
I have two text boxes (user and password) and drop-down list (domain) to authenticate user using Adcive Directory and database. Now when user clicks "Login" button his credentials are checked in Active Directory and if its authinticated, next method checks if user exists in database and checs its role. I would like to remove the logon page and enable automatically authentication using Windows authentication. I have changed the web.config file and chenged
<authentication mode="Forms">
<forms loginUrl="~/LogIn.aspx" timeout="60" name="AuthCookie"/>
</authentication>
to
<authentication mode="Windows"></authentication>
<identity impersonate="true"/>
Now I would like to know how can I check if user exists in the database and check its role?
Thank you for your replies.
Upvotes: 0
Views: 219
Reputation: 155588
You'll need to implement your own authentication provider that will wrap both an AD backend and your own application's account database. You'll want to disable IIS' built-in Windows Authentication provider because your version will provide the implementation to use.
Upvotes: 1