title: Basic authentication on a site from a remote server not working
body: <p>I setup a really basic authentication schema using a SHA1 pw and credentials stored in web.config.</p>
  
  <p>After deploying the .Net 4.0 site (in IIS 7), I can successfully login when I go to the www location from the server the site resides on.</p>
  
  <p>However when trying to login from a browser on another computer, putting in the appropriate credentials just cycles right back to the login screen.</p>
  
  <p>In the site's IIS Authentication, I enabled Anonymous, Basic and Forms.</p>
  
  <pre><code>  &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0"&gt;
      &lt;/compilation&gt;
      &lt;authentication mode="Forms"&gt;
        &lt;!-- &lt;forms loginUrl="~/Account/Login.aspx" timeout="2880"/&gt; --&gt;
        &lt;forms name=".ASPXFORMSAUTH" loginUrl="~/Account/Login.aspx" defaultUrl="~/AdminPages/Default.aspx" cookieless="UseCookies"  timeout="30"&gt;
          &lt;credentials passwordFormat="SHA1"&gt;
            &lt;user name="user1" password="77A80B8DE9F00DD1CC502344C38FC1BA24CC0897" /&gt;
            &lt;user name="user2" password="329E66AD5EC6E09AA8002311ACAF6ADBACD12DC4" /&gt;
          &lt;/credentials&gt;
        &lt;/forms&gt;
      &lt;/authentication&gt;
      &lt;authorization&gt;
        &lt;deny users="?" /&gt;
      &lt;/authorization&gt;
    &lt;/system.web&gt;
    &lt;location path="Styles"&gt;
      &lt;system.web&gt;
        &lt;authorization&gt;
          &lt;allow users="*"/&gt;
        &lt;/authorization&gt;
      &lt;/system.web&gt;
    &lt;/location&gt;
    &lt;location path="Scripts"&gt;
      &lt;system.web&gt;
        &lt;authorization&gt;
          &lt;allow users="*"/&gt;
        &lt;/authorization&gt;
      &lt;/system.web&gt;
    &lt;/location&gt;
    &lt;location path="Account"&gt;
      &lt;system.web&gt;
        &lt;authorization&gt;
          &lt;allow users="*"/&gt;
        &lt;/authorization&gt;
      &lt;/system.web&gt;
    &lt;/location&gt;
    &lt;location path="AdminPages"&gt;
      &lt;system.web&gt;
        &lt;authorization&gt;
          &lt;allow users="user1,user2"/&gt;
          &lt;deny users="*"/&gt;
        &lt;/authorization&gt;
      &lt;/system.web&gt;
    &lt;/location&gt;
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thanks.</p>