Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Getting the current users login name in IIS7

Posted on 2009-05-18
3
Medium Priority
?
1,508 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

604 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