title: Why does LoginStatus control not redirect to login page on root of webserver?
body: <p>I am coding in asp.net 4.5 on IIS 8 and have a master page which has a LoginStatus control in the menus. This control is shown on every page. </p>
  
  <pre><code>&lt;asp:LoginStatus ID="LoginStatus1" runat="server" 
  CssClass="loginbutton" LoginText="Log In" Width="50" 
  LogoutAction="Redirect" LogoutPageUrl="~/Default.aspx" /&gt;
  </code></pre>
  
  <p>If I browse to: <code>http://localhost/Default.aspx</code> page in the root of the site and click on Login, I am redirected to the Login page. </p>
  
  <p>I have setup IIS to show Default.aspx as the default document. However, if I browse to: <code>http://localhost/</code> which shows the home page content correctly and click on the Login link, I am just redirected back to <code>http://localhost</code> and not the login page.</p>
  
  <p>What do I need to do to make sure I can login from the homepage?</p>
  
  <p>==================UPDATE==========================
  I couldn't figure this out, so since the default document for the root of the site is 'default.aspx' (notice the lower case), I've put in the following code on Page_Load:</p>
  
  <pre><code>       if  (Request.Url.ToString().Contains("default.aspx"))
              Response.Redirect("Default.aspx");
  </code></pre>
  
  <p>and I now if anyone goes to <code>http://localhost/</code> they are redirected to <code>http://localhost/Default.aspx</code> where the loginstatus control works fine. Still don't know the cause of the issue, but at least I have a workaround.</p>