title: Getting Windows User ID When Using Forms Authentication
body: <p>I'm working on an ASP.NET MVC app running on our intranet.  We are using forms authentication, however the usernames set up will be the same as the Active Directory usernames.  I'm trying to find a way to pre-populate the login username field with the Windows username, but can't find a way to access the current Windows user identity.</p>
  
  <p><code>System.Environment.UserDomainName</code> returns "IIS APPPOOL"</p>
  
  <p><code>System.Security.Principal.WindowsPrincipal.Current.Identity</code> returns a GenericIdentity</p>
  
  <p><code>HttpContext.Request.LogonUserIdentity.Name</code> returns "NT AUTHORITY\IUSR"</p>
  
  <p>I do not want to authenticate the Windows user or login to the website as the Windows user, I just want to read the username.  Is there any way to do this whilst using Forms Authentication rather than Windows Authentication?</p>