This is the MVC2 website, I have a problem with the FormsAuthentication ticket. The user timeout after 30 minutes cannot log in again. During testing, the value of DateTime.Now.AddMinutes (30) was set to 5000, and everything was fine, but now it has changed to 30, and then a problem occurred.
From creating a cookie
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket( 1, user.UserID, DateTime.Now, DateTime.Now.AddMinutes(30), false, "user,user1", FormsAuthentication.FormsCookiePath);
Web.config File
<authentication mode="Forms"> <forms loginUrl="~/Account.mvc/LogOn" timeout="2880" name=".ASPXFORMSAUTH" /> </authentication>
Should the validity value when creating a ticket be> = web.config value?
c # cookies asp.net-mvc-2
Don Mar 02 '11 at 18:17 2011-03-02 18:17
source share