Windows Authentication

I am changing my app to have Windows authentication instead of forms.

I get the jist of the authentication method, but as part of my app I ask the user to re-enter their username and password to confirm they have understood something.

How do I get the authentication window to appear if the user is already logged in? and if they fail to authenticate I do not want the user logged out, just prompted to re-enter.

Thanks
LVL 1
SolugaAsked:
Who is Participating?
 
Carl TawnSystems and Integration DeveloperCommented:
If I understand you correctly then you can't do what you with the standard authentication mechanism. Authentication controls access to the site/directories themselves, it doesn't provide authentication for specific business processes within your application.

You can on the other hand present the user with a dialog of your own and verify the credentials provided against AD using the PrincipalContext object in the System.DirectoryServices.AccountManagement namespace.
0
 
SolugaAuthor Commented:
Do I have to have AD installed to use Windows authentication?
0
 
Carl TawnSystems and Integration DeveloperCommented:
You need to have a domain to authenticate users against. Windows Authentication means passing the Windows identity of the user accessing the site, which is then authenticated against the domain users list.
0
 
SolugaAuthor Commented:
I have webserver 2008 R2.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.