At one point all of the following would produce "MY_DOMAIN\MyUserId" when viewing a page in my web.
HttpContext.Current.Request.LogonUserIdentity.Name; HttpContext.Current.User.Identity.Name; System.Security.Principal.WindowsIdentity.GetCurrent().Name; System.Environment.UserName;
Now however something has changed and now "HttpContext.Current.Request.LogonUserIdentity.Name" is showing the Id of the account in the [Physical Path Credentials] under "Advanced Setting" for the web.
I am a novice when it comes to IIS so forgive my ignorance.
- The web is set up for Windows Authentication only (users access is then determine in the app by the userId that is logged into the local PC).
- The webs [Physical Path Credentials] is set to a domain account (well call it mydom\service_account)
- A Virtual directory is used to which "mydom\service_account" is used to grant access
- The AppPool for the web is running under "mydom\service_account" as well
I thought that whatever account the apppool was running under would be the account that would provide credentials for everything (running the web, accessing network resources, etc). I didn't even know about the [Physical Path Credentials] under Web and Virtual Directory till the web started malfunctioning. Cause still unknown.
Is this setup weird or what?
thanks