title: Log in and log out in asp.net pages
body: <p>I need to create a log in page in a asp.net web site. I declare this code in web.config file:</p>
  
  <pre><code>    &lt;location path="Login.aspx"&gt;
  &lt;system.web&gt;
    &lt;authorization&gt;
      &lt;allow users="*"/&gt;
    &lt;/authorization&gt;
  &lt;/system.web&gt;
  </code></pre>
  
  <p>
      </p>
  
  <pre><code>&lt;system.web&gt;&lt;authentication mode="Forms"&gt;
    &lt;forms name="MyAppCookie" loginUrl="Login.aspx" protection="All" timeout="30" defaultUrl="Managment.aspx" &gt;&lt;/forms&gt;
  
  &lt;/authentication&gt;
  
  &lt;authorization&gt;
    &lt;deny users="?"/&gt;
  
  &lt;/authorization&gt;&lt;system.web&gt;
  </code></pre>
  
  <p>And I have a button in Managment.aspx to exit which runs this code:</p>
  
  <pre><code>protected void Exit_Click(object sender, EventArgs e)
  {
      FormsAuthentication.SignOut();
      FormsAuthentication.RedirectToLoginPage();
  }
  </code></pre>
  
  <p>Every thing is OK, but when I try to log out using Exit button, I give this Error:</p>
  
  <p><img src="https://i.stack.imgur.com/bdSNS.png" alt="enter image description here">
   But I have no Account Folder which specified in address bar! I have just a Login.aspx file in website root. I expected by clicking this button system transform control to Login.aspx Page directly. Is it right? How I can fix this problem?</p>