title: Asp.net "Remember Me" does not work through FormsAuthentication.RedirectFromLoginPage()
body: <p>In my login page I'm using <code>FormsAuthentication.RedirectFromLoginPage()</code> to redirect to Home page after the user is validated. But it doesn't seem to obey <code>CreatePersistenceCookie</code> parameter. I have searched in Google and modified my Web.Config but still Remember Me functionality does not work.</p>
  
  <p>this is my sample code structure (using asp.net login control as the login UI)</p>
  
  <pre><code>if (MyService.ValidateUser(LoginUser.UserName, LoginUser.Password))
  {
     FormsAuthentication.RedirectFromLoginPage(LoginUser.UserName, LoginUser.RememberMeSet);
  }
  </code></pre>
  
  <p>Web.Config</p>
  
  <p><code>&lt;forms loginUrl="~/Account/Login.aspx"
  timeout="21600"
  cookieless="AutoDetect"
  name="MySiteAuth"
  slidingExpiration="true"/&gt;
  </code></p>
  
  <p>Even when LoginUser.RememberMeSet is True (user has selected Remember Me checkbox) the browser doesn't remember the session. So when I open the web site next time I'm presented with the Login page. Ideally Login page should only come if have specifically Logged-out in the previous session. otherwise it should persist my session.</p>
  
  <p>Does anyone have an explanation for this?</p>
  
  <p>thanks</p>