How to use Windows domain login to authenticate ASP.net website?

I want to use my company's windows domain to authenticate my ASP.net website and capture the Username/userID and verify the credentials from the tables I created.
How do I do this?
Raj_donetAsked:
Who is Participating?
 
Jens FiedererTest Developer/ValidatorCommented:
You can use an authentication mode of Windows.  See

http://msdn.microsoft.com/en-us/library/aa291347(v=vs.71).aspx
0
 
Jens FiedererTest Developer/ValidatorCommented:
You can then use
HttpContext.Current.User.Identity.Name
to find the user name of whoever is logged in.   Note this works for INTRANET web sites...for web sites facing the world you are better off with Forms authentication  (or one of the open source identity providers)
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Raj_donetAuthor Commented:
When I use  <authentication mode="Windows"> in web.config, nothing is happening. Can you explain in detail. I am new to this.
0
 
Raj_donetAuthor Commented:
I tried using Basic authentication and it works fine, but it throws popup login when page loads, is there a way we can use the same functionality integrating in Login page?
0
 
Jens FiedererTest Developer/ValidatorCommented:
If you use Windows authentication mode, nothing SHOULD happen.   You are already logged into Windows, so there is no need for an authentication page....the user name should just magically be in HttpContext.Current.User.Identity.Name.

What kind of environment do you have?  Are you working at a company where you are part of a domain?

Or do you just have your own desktop?
0
 
Jens FiedererTest Developer/ValidatorCommented:
(sorry, forgot you already mentioned you were in your company domain...but details could still be useful)
0
 
Jens FiedererTest Developer/ValidatorCommented:
(note that you also need to disable anonymous auth, or it won't bother going through windows auth)
0
 
Raj_donetAuthor Commented:
Thanks
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.