title: CurrentPrincipal.Identity.Name is blank
body: <p>I'm trying to use <code>System.Threading.Thread.CurrentPrincipal.Identity.Name</code> to get the login of who is using an ASP.NET application. I'm not getting any build errors, but it returns a blank value. I'm using IIS 6 and here are my authentication settings:</p>
  
  <ul>
  <li>Anonymous Authentication: Disabled</li>
  <li>ASP.NET Impersonation: Disabled</li>
  <li>Basic Authentication: Enabled</li>
  <li>Windows Authentication: Enabled</li>
  </ul>
  
  <p>I have no authorization settings in my <code>Web.config</code> file either. Here is the method I am using to try to get the login:</p>
  
  <pre><code>    public void SetUser()
      {
         string login = System.Threading.Thread.CurrentPrincipal.Identity.Name;
      }
  </code></pre>
  
  <p>I have a breakpoint to check the value and it says <code>login = ""</code>.</p>
  
  <p>How can I get the login?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here is my authentication picture:<img src="https://i.stack.imgur.com/165rL.png" alt="enter image description here"></p>