PersistentCookieTimeout

Return to previous page

  • 4/7/2015
  • 4573 Views

Comments

4573 Views

PersistentCookieTimeout

Last updated 5 years ago

Comments

Common

(Enter the content of this article below)

Advanced

 
Ever since the release of asp.net 2.0 theres been a long standing issue with the behaviour of temporary and persistent cookies where there wasn't a way to set short periods of temporary cookie expiration and to specify longer periods for user who don't want to regularly log in. This was caused by a change in the way asp.net 2.0 handles the different types of authentication cookies (for the full background on this see http://www.dnnsoftware.com/Resources/Blogs/EntryId/1704/Why-doesnt-Remember-me-work-like-I-expect.aspx) .

To work around this limitation of asp.net 2.0, the web.config has a key, PersistentCookie, that get's read during login and some custom code then updates the cookie values approriately if "remember me" has been selected. This allows site owners to select values that allow for security for temporary users and convenience for those who want persistent cookies..

If you want to make similar changes to your own site, edit your web.config and update the following nodes to whatever value you require (the approriate fields are identied in bold below - all values are in minutes i.e. 60 minutes*24 hours*14 days=20160).

<forms name=".DOTNETNUKE" protection="All" timeout="120" cookieless="UseCookies" />

<add key="PersistentCookieTimeout" value="20160" />

Note: It's possible to disable support for persistent cookies via a setting

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  

What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out