title: ASP.Net MVC 2 Application Login page as startuppage
body: <p>Dear All,
  I want to disable anonymous access to my MVC 2 application for that I add below code in web.config file <code>&lt;deny users="?" /&gt;
       &lt;authentication mode="Forms"&gt;
        &lt;forms loginUrl="~/Account/LogOn" timeout="2880" /&gt;
      &lt;/authentication&gt;</code>
  After that application start with login page but it is not taking masterpage and css styles</p>
  
  <p>This is Login page code</p>
  
  <p>`&lt;%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %></p>
  
  <p>
      Log On
  </p>
  
  <p>
      <h2>Log On</h2>
      <p>
          Please enter your username and password. &lt;%: Html.ActionLink("Register", "Register") %> if you don't have an account.
      </p></p>
  
  <pre><code>&lt;% using (Html.BeginForm()) { %&gt;
      &lt;%: Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.") %&gt;
      &lt;div&gt;
          &lt;fieldset&gt;
              &lt;legend&gt;Account Information&lt;/legend&gt;
  
              &lt;div class="editor-label"&gt;
                  &lt;%: Html.LabelFor(m =&gt; m.UserName) %&gt;
              &lt;/div&gt;
              &lt;div class="editor-field"&gt;
                  &lt;%: Html.TextBoxFor(m =&gt; m.UserName) %&gt;
                  &lt;%: Html.ValidationMessageFor(m =&gt; m.UserName) %&gt;
              &lt;/div&gt;
  
              &lt;div class="editor-label"&gt;
                  &lt;%: Html.LabelFor(m =&gt; m.Password) %&gt;
              &lt;/div&gt;
              &lt;div class="editor-field"&gt;
                  &lt;%: Html.PasswordFor(m =&gt; m.Password) %&gt;
                  &lt;%: Html.ValidationMessageFor(m =&gt; m.Password) %&gt;
              &lt;/div&gt;
  
              &lt;div class="editor-label"&gt;
                  &lt;%: Html.CheckBoxFor(m =&gt; m.RememberMe) %&gt;
                  &lt;%: Html.LabelFor(m =&gt; m.RememberMe) %&gt;
              &lt;/div&gt;
  
              &lt;p&gt;
                  &lt;input type="submit" value="Log On" /&gt;
              &lt;/p&gt;
          &lt;/fieldset&gt;
      &lt;/div&gt;
  &lt;% } %&gt;
  </code></pre>
  
  <p>`</p>
  
  <p>can someone direct me what I am missing?</p>