title: How do I set up .NET WindowsAuthentication - the name always shows up as "IIS APPPOOL\Classic .NET AppPool" when I want it to use the actual user
body: <p>I'm using the following code to authenticate via Kerberos. </p>
  
  <pre><code>IntPtr logonToken = WindowsIdentity.GetCurrent().Token;
  string authenticationType = "WindowsAuthentication";
  WindowsIdentity windowsIdentity = new WindowsIdentity(logonToken, authenticationType);
  
  //windowsIdentity.Name == equals "IIS APPPOOL\Classic .NET AppPool" when I want it to be the user
  </code></pre>
  
  <p>This only happens when I try and run my .NET application the Web Server. If I run the code locally on my machine for debugging, it shows my userid in the Name property.  Any suggestions on how to get this working on a web server?</p>