title: ASP.Net WebForms using Windows Authentication
body: <p>I'd like to play about with WindowsAuthentication but am seemingly falling  down at the first hurdle.</p>
  
  <p>So I created an empty ASP.Net Webforms app and amended the web.config as so:</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;system.web&gt;
          &lt;compilation debug="true" targetFramework="4.0"/&gt;
          &lt;httpRuntime/&gt;
  
          &lt;authentication mode="Windows" /&gt;
          &lt;identity impersonate="true"/&gt;
      &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Fire up the app and on page load check the following for a value:</p>
  
  <pre><code>HttpContext.Current.User.Identity.Name
  </code></pre>
  
  <p>but it returns an empty string (and also shows that <code>HttpContext.Current.User.Identity.IsAuthenticated</code> is false).</p>
  
  <p>My expectation was to see my windows account name returned e.g. <code>mydomain\rob</code></p>
  
  <p>Where am I going wrong?</p>