Solved

Windows Authentication

Posted on 2014-04-15
4
189 Views
Last Modified: 2014-04-15
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
0
Comment
Question by:Soluga
  • 2
  • 2
4 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
Comment Utility
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
 
LVL 1

Author Comment

by:Soluga
Comment Utility
Do I have to have AD installed to use Windows authentication?
0
 
LVL 52

Expert Comment

by:Carl Tawn
Comment Utility
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
 
LVL 1

Author Comment

by:Soluga
Comment Utility
I have webserver 2008 R2.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now