1

Trying to make an app that relies on the windows login name of the user, but not sure how I get that working in IIS7, it's not to use it for authentication/login purposes for my app, there is no such thing in what I'm building.

Normally within my code I'd use System.Security.Principal.WindowsIdentity.GetCurrent().Name, with my current IIS config it's returning NT AUTHORITY\IUSR as the value.

Any ideas on what I need to change to get what I'm expecting?

2
  • Let me make sure I understand: You are going to have Windows-only clients attaching to a web application (via IIS) but they do not need to log in. That is, you expect that Kerberos etc. will be set correctly, no non-bound clients will be hitting the app--and you just want to grab that information from the session. Is that right? Apr 3, 2011 at 21:59
  • Hi Johnnie, that's right, it's an internal application for the workplace, anyone connecting to it, by default, will be logged into the work network, that's the only way the url it'll be hosted on is accessible
    – Psytronic
    Apr 4, 2011 at 6:56

1 Answer 1

1

If it's showing the IUSR, then anonymous authentication is kicking in. If you want it password protected then remove anonymous access for the folder(s) that you want users to authenticate. Then, in a domain it will authenticate with their windows account as long as their account is granted access, or in a non-domain it will ask for credentials.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .