Incorrect forms authentication timeout
I want to make "remember time" on a site something aroun one week. In default mvc 3 application I set this changes:
<forms loginUrl="~/Account/LogOn" timeout="10880" slidingExpiration="true" />
But, it is not enought. After half an hour site forget me. What could be wrong?
Did you set propert timeout for the forms authentication ticket and also the isPersistent parameter should be set as true.
FormsAuthenticationTicket tkt = new FormsAuthenticationTicket ( 1, // version username, // user name DateTime.Now, // issue date expiration, // this should also be set to 10880 rememberMeChecked, // this should be true null, // additional data "/" // cookie path );
For more info see here.