title: asp.net authorization
body: <p>In my ASP.NET Application, I have an asmx Web Service which is in it's own directory. For this WS I have set the basic authentication under IIS 6.0 and put the separate web.config for that folder, with following nodes:</p>
  
  <pre><code>    &lt;system.web&gt;
        &lt;authorization&gt;
          &lt;allow users="domain\username"/&gt;
          &lt;deny users="*"/&gt;
        &lt;/authorization&gt;
      &lt;/system.web&gt;    
  </code></pre>
  
  <p>With settings like these I get 
  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>when webmethod is invoked with SOAPUI or with browser. If I remove the deny node, any valid user in domain can get a web service response.</p>
  
  <p>Any suggesstions how to make it work for one domain user only?</p>
  
  <p>Maybe I should mention also, that authentication in main web.config is set to "Windows".</p>