?
Solved

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

Posted on 2013-11-05
9
Medium Priority
?
351 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

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
 
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 1500 total points
ID: 39630401
0
 

Author Closing Comment

by:Raj_donet
ID: 39639415
Thanks
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

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