title: Strange IIS Windows Authentication behavior
body: <p>I have an ASP.NET 3.5 web service (old school SOAP, not WCF) running on two servers set up identically in IIS 6.0.  The Authentication/Access control is set up as follows: </p>
  
  <ul>
  <li>Enable Anonymous Access = False</li>
  <li>Integrated Windows authentication = True</li>
  <li>Digest authentication for Windows domain servers = False</li>
  <li>Basic authentication = False</li>
  <li>.NET Passport authentication = False</li>
  </ul>
  
  <p>In one of the web methods, I need to get the Identity of the requesting user and validate that it's in a certain Active Directory group.  So, the first line of code in the web method is this:</p>
  
  <pre><code>var requestUser = HttpContext.Current.Request.LogonUserIdentity.Name;
  </code></pre>
  
  <p>For some reason the results are different between the two servers.  Server1 works as expected, producing <code>domain\UserId</code>.  However, Server2 produces <code>Server2\IUSR_SERVER2</code>.  Has anyone experienced this before?  I did find <a href="https://stackoverflow.com/questions/590315/asp-net-windows-authentication">this question</a>, but I'm pretty sure it doesn't apply here as client and both servers are all in the same domain.</p>
  
  <h2>Additional Info</h2>
  
  <p>Based on Heinzi's response, I added the following to the <code>&lt;system.web&gt;</code> section in both web.config files:</p>
  
  <pre><code>&lt;authorization&gt;
      &lt;deny users="?" /&gt;
      &lt;allow users="*" /&gt;
  &lt;/authorization&gt;
  </code></pre>
  
  <p>Now, Server1 behaves the same, as in, it behaves as I want it to.  However, Server2 throws a 401.2: Unauthorized error:</p>
  
  <p>Server Error in '/' Application.</p>
  
  <p>Access is denied. 
  Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL. </p>
  
  <p>Error message 401.2.: Unauthorized: Logon failed due to server configuration.  Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server.  Contact the Web server's administrator for additional assistance.</p>
  
  <p>Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3053 </p>