HttpContext.Current.User.Identity.Name is empty using IIS Express but not Visual Studio Development Server [duplicate] HttpContext.Current.User.Identity.Name is empty using IIS Express but not Visual Studio Development Server [duplicate] asp.net asp.net

HttpContext.Current.User.Identity.Name is empty using IIS Express but not Visual Studio Development Server [duplicate]


I solved this problem by changing the IIS in Authentication

Windows Authenticaon = EnabledAnonymous Authentication = DISABLED <=== ImportantASP.NET Impersonation Enabled

My IIS


I have solved it! you need to give permission to "NETWORK", "NETWORK SERVICE" and IIUSRS in the folder. And disable the anonymous access.