Monday, July 13, 2020
Beetle Blog Membership Login is Logged out after app pool restart
By: douglas - - 8/24/2010 1:10:44 AM


Your application uses the membership and roles provider and users have checked the "remember me" option when logging in that uses a persistent cookie to keep a user logged in.  If the app pool for an application is recycled the user may become logged out even though the cookie has not expired and still exists.

This issue most often appears in a web farm but can appear in a single server environment.


The cookie becomes invalid because the machine key for the application has changed after the app pool recycles.  The machine key is used to read the persistent cookie.  Since it has changed your application can no longer read the cookie and users appear to be logged out.


Add a static segment to the web.config.  This will make your application use the same machine key even after an app pool recycle.

Additional Information:

About Machine Key:

Tool for generating a Machine Key for the web.config:


Last Modified: 8/24/2010 1:10:44 AM

Beetle Blog v0.2.2

Copyright © 1997 - 2020 All rights reserved.