Solved

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

Posted on 2013-11-05
9
345 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

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

Author Closing Comment

by:Raj_donet
ID: 39639415
Thanks
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
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…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

777 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