Solved

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

Posted on 2013-11-05
9
342 Views
Last Modified: 2013-11-11
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?
0
Comment
Question by:Raj_donet
  • 6
  • 3
9 Comments
 
LVL 23

Expert Comment

by:Jens Fiederer
ID: 39624199
You can use an authentication mode of Windows.  See

http://msdn.microsoft.com/en-us/library/aa291347(v=vs.71).aspx
0
 
LVL 23

Expert Comment

by:Jens Fiederer
ID: 39624212
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
 

Author Comment

by:Raj_donet
ID: 39627257
When I use  <authentication mode="Windows"> in web.config, nothing is happening. Can you explain in detail. I am new to this.
0
 

Author Comment

by:Raj_donet
ID: 39627259
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 23

Expert Comment

by:Jens Fiederer
ID: 39627923
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
 
LVL 23

Expert Comment

by:Jens Fiederer
ID: 39630287
(sorry, forgot you already mentioned you were in your company domain...but details could still be useful)
0
 
LVL 23

Expert Comment

by:Jens Fiederer
ID: 39630396
(note that you also need to disable anonymous auth, or it won't bother going through windows auth)
0
 
LVL 23

Accepted Solution

by:
Jens Fiederer earned 500 total points
ID: 39630401
0
 

Author Closing Comment

by:Raj_donet
ID: 39639415
Thanks
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

747 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

12 Experts available now in Live!

Get 1:1 Help Now