I hope the session will never expire, once the user logs in, unless the user clicks to log out.
< p>Is this the best way?
I used it
FormsAuthentication.SetAuthCookie(userName, createPersistentCookie);
and set createPersistentCookie to true, but still Exit after a period of time.
I am building an asp.net mvc application.
I hope The session will never expire, once the user logs in, unless the user clicks to log out.
Is this the best way?
I used it
FormsAuthentication.SetAuthCookie(userName, createPersistentCookie);
and set createPersistentCookie to true, but still Log out after a period of time.
Achieve sliding expiration. Keep expiration time at a reasonable value-one day, two weeks, maximum; every request (Easiest) or update the cookie at a specific interval.