Web Resources   >   DotNetNuke   >   Remember Login
March 23, 2017

 

Ever since the 4.x releases of DotNetNuke 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 DNN Community Blog )

After a few attempts, and with a helpful hint from Don Worthley, we finally got code in the 4.8.1 release that addresses this problem, and recently updated the dotnetnuke.com configuration to take advantage of this. At the minute if you log into dotnetnuke.com, but don't check the "remember me" checkbox a temporary cookie is created with a timeout of 2 hours. If you check the "remember me" checkbox, a persistant cookie is created with a timeout of 2 weeks. To work around this limitation of asp.net 2.0, we added a new web.config 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..

To see code to fix your site, follow this link...