title: Login page not redirecting properly
body: <p>I have created 2 folders in my asp.net project. (Account and AdminFolder)
  I want to restrict the Register.aspx page to Admin users only.</p>
  
  <p>My Login.aspx page is in the Account folder and I have included a web.config in that folder with the following code;</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
  &lt;system.web&gt;
  &lt;authorization&gt;
    &lt;deny users="?"/&gt;
  &lt;/authorization&gt;
  &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I have placed the Register.aspx file in the AdminFolder with the following web.config code. </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
  &lt;system.web&gt;
    &lt;authorization&gt;
      &lt;allow roles="Admin"/&gt; 
      &lt;deny users="*"/&gt; 
    &lt;/authorization&gt;
  &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>In testing this approach out, I have tried to launch the application by going directly to the Register.aspx file. As expected, I am redirected to the Login.aspx page. </p>
  
  <p>The url showing up in the browser is</p>
  
  <pre><code>http://localhost:49319/Account/Login.aspx?ReturnUrl=%2fAdminFolder%2fRegister.aspx
  </code></pre>
  
  <p>I login as an Admin user and I can see that I am logged in as my header hyperlink changes to logout. (I can also navigate to other files in Account to confirm I am logged in) However, the application remains at the login page instead of redirecting to the Register.aspx page.</p>
  
  <p>I expected to be redirected to the Register.aspx page when login was successful.</p>
  
  <p>Even once I am logged in as Admin user, I am unable to navigate directly to the Register.aspx page. I am redirected to Login.aspx.</p>
  
  <p>I confirmed (by way of my Sql Server database) that the user in my test case is in the Admin role. </p>
  
  <p>Can anyone nudge me in the right direction here? Thanks in advance for you time and consideration.</p>