title: ASP.NET MVC issue with configuration of forms authentication section
body: <p>I have an ASP.NET MVC 3 Beta application running on IIS. In my <code>web.config</code> I defined following section responsible for forms authentication:</p>
  
  <pre><code>&lt;authentication mode="Forms"&gt;
      &lt;forms 
          loginUrl="~/Account/LogOn" 
          name=".VNK" 
          protection="All" 
          timeout="43200" 
          cookieless="UseCookies" /&gt;
  &lt;/authentication&gt;
  </code></pre>
  
  <p>The defined login address is <code>~/Account/LogOn</code>.</p>
  
  <p>When I try to get the login url using:</p>
  
  <pre><code>FormsAuthentication.Initialize();
  string loginUrl = FormsAuthentication.LoginUrl; 
  </code></pre>
  
  <p>I receive: <code>/VNK/site/Account/Login</code></p>
  
  <p>Why do I get a different address from the one defined in <code>web.config</code>?</p>
  
  <p><strong>UPDATE</strong>: The "/VNK/site/" prefix is <strong>not</strong> a problem here. The problem is that <code>LoginUrl</code> property of <code>FormsAuthentication</code> class does not reflect the value from web.config. It means that if I change the value of <code>loginUrl</code> attribute in web.config from "~/Account/LogOn" to e.g. "~/foobar", <code>FormsAuthentication.LoginUrl</code> still has value of "/VNK/site/Account/Login". Why ?</p>