Remember Me problem in ASP.NET MVC 2
Greetings. I have a problem with Remember Me possibility. It didn't remember my login. First of all I checked FormsAuthentication.SetAuthCookie( userName, createPersistentCookie );
in SignIn
method. The second parameter is true
if I checkbox is cheked. Also I've checked the cookie named .ASPXAUTH
( http://img412.imageshack.us/img412/3585/cookieb.png ).
It expire开发者_高级运维s on a day about. But it's not works. If i try open web application after 10 minutes (for example), I will logged out.
How can I fix it and how can I enlarge cookie lifetime?
Seems like you're using membership. Something like...
http://dotnetblogger.com/post/2010/01/11/ASPNET-Membership-Remember-Me-That-Actually-Works.aspx
should work.
Mostly, you need FormsAuthentication.RedirectFromLoginPage()
精彩评论