title: ASP.NET Forms Authentication always redirecting back to Login page
body: <p>I have a problem with an incredibly simple website using simple Forms authentication.
  I have a a single page Default.aspx and a Login.aspx.</p>
  
  <p>Default.aspx is protected by <code>&lt;deny users="?" /&gt;</code></p>
  
  <p>The Login.aspx calls </p>
  
  <pre><code>FormsAuthentication.RedirectFromLoginPage( tbUserName.Text, chPersist.Checked );
  </code></pre>
  
  <p>I used Fiddler to check if the redirect works. It does. But the Default page always redirects back to the Login page (HTTP/1.1 302 Found).
  <strong>The cookie is created as expected and Fiddler tells me it's there. But it just won't load the default page.</strong></p>
  
  <p>I tried so many combinations, but the only thing that makes the default page load "successfully" is when I turn <strong>off</strong> the deny="?" rule in IIS/web.config. But then all users can get to the page, which is not what I want.</p>
  
  <p>Web.config on the server and my machine:</p>
  
  <pre><code>    &lt;authentication mode="Forms"&gt;
          &lt;forms loginUrl="Login.aspx" name=".ASPXFORMSAUTH" defaultUrl="Default.aspx" cookieless="UseCookies" /&gt;
      &lt;/authentication&gt;
      &lt;authorization&gt;
          &lt;deny users="?" /&gt;
      &lt;/authorization&gt;      
  </code></pre>
  
  <p><strong>Ironically all this is working great in any case when I debug the site in Visual Studio, but upon deployment it does not work. The web.config is deployed with the site.</strong></p>
  
  <p>I have no idea why this still isn't working.
  Anyone?</p>