[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2013-11-05
9
Medium Priority
?
356 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
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
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…
Suggested Courses

834 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