title: Cannot authorize with different server name
body: <p>I have a web service running in IIS 6.0 on Windows 2003. It's authentication mode is Integrated Windows security (anonymous disabled), and authorization is done with Authorization Manager and an XML authorization store. My test user is a domain user (admin, actually) with membership in an authorized role.</p>
  
  <p>I am testing this (for now) on the web server (localhost), and using (for now) Internet Explorer to access the web service (.asmx).</p>
  
  <p>I can successfully open the web service (wsdl) page through localhost, like this:</p>
  
  <pre><code>http://localhost:8080/MyService/MyService.asmx
  </code></pre>
  
  <p>Using this url, integrated windows authentication succeeds (silently), and I am sucessfully authorized by AzMan to access the service. The same goes for the server name:</p>
  
  <pre><code>http://myserver:8080/MyService/MyService.asmx
  </code></pre>
  
  <p>Now I need to use the external host name (www.mysite.no) to access the service (this in order to get ssl to work with a certificate issued to that sitename). To do this, I add the host name to my HOSTS file, like this:</p>
  
  <pre><code>127.0.0.1   www.mysite.no
  </code></pre>
  
  <p>...then type this into IE:</p>
  
  <pre><code>http://www.mysite.no:8080/MyService/MyService.asmx
  </code></pre>
  
  <p>What happens then is that authorization fails. I get the IE/Windows login box and enter my correct credentials three times. Then I get a 401.1:</p>
  
  <pre><code>HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.
  Internet Information Services (IIS)
  </code></pre>
  
  <p>How is authorization through AzMan influenced by the host name?</p>
  
  <p><strong>Edit</strong>: I have reason to believe AzMan has nothing to do with it - it seems to be the authentication that fails.</p>
  
  <p>I have reproduced the problem on another server. The essence seems to be that accessing localhost via an entry in the local host file somehow messes up the integrated windows authentication between the browser and IIS.</p>
  
  <p>I have worked around the problem, now my curiosity is all that's left...</p>