?
Solved

Getting the current users login name in IIS7

Posted on 2009-05-18
3
Medium Priority
?
1,502 Views
Last Modified: 2012-05-07
I have a web project which has been running on an IIS6 server for some time with no issues but i now need to migrate it over to IIS7 and i am having an issue which i cant seem to figure out.

The project uses active directory to authenticate users and to do this it gets the currently logged in user with 'LoginUser = new ProjectIdentity(Request.LogonUserIdentity.Name);'. This has been working fine on IIS6 but as soon as i have moved over to IIS7 the 'Request.LogonUserIdentity.Name' is only returning 'NT AUTHORITY\IUSR' every single time, whereas on IIS6 it would return DOMAIN\USER as expected.

Can anyone shed any light on the issue?
0
Comment
Question by:sypher1987
[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
3 Comments
 
LVL 4

Accepted Solution

by:
somnatic earned 150 total points
ID: 24413839
Probably you need to allow Windows Authentication in the IIS settings (not only basic auth).
0
 
LVL 5

Expert Comment

by:random_ru
ID: 24414478
Are you using the ASP.NET login control or a custom build one?
 - If it is a ASP.NET control, use the control's property (username or password), for instance in C#:
         string username = LoginControlID.username;
 - If it is a custom built login, simply reference the username box, for instance;
        string username = txtUsernameID.Text;
0
 
LVL 16

Expert Comment

by:jessc7
ID: 24414481
IIS 7.0: Configure Windows Authentication
http://technet.microsoft.com/en-us/library/cc754628.aspx
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

741 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