title: Getting the name of the current Windows user returning "IIS APPPOOL/Sitename"
body: <p>I can't figure this out for the life of me. I'm trying to get the name of the current user logged onto Windows using the following line:</p>
  
  <pre><code>string user = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
  </code></pre>
  
  <p>When I run this line after publishing and opening it through IIS, it gives me a name of "IIS APPPOOL/SiteName". However, when I run this through the Visual Studio 2013 debugger, the correct name appears.</p>