I have an asp.net application on my server that uses WindowsAuthentication to log in. The scenario is simple: users logged in, will use the same credentials to login the application.
Certainly, on IISExpress on my machine works great, but when I try to login the application on server, the current user returned is DefaultAppPool.
I guess it's a missing impersonate config on IIS. I tried to get the current user with:
string username = HttpContext.Current.Request.LogonUserIdentity.Name;
string username = WindowsIdentity.GetCurrent().Name;
... and all of above returns the current user loggedin but only works on IISExpress, but not on server IIS.
IIS Express config
DefaultAppPool
- Framework Version 4.0
- Application Pool Identity
Application Authentication Config
Server Info
Windows 2008 R2 Enterprise
IIS 7.5
PD: Is not my best English