views:

24

answers:

0

Persistence doesn't work in my web application on one server while it does on another. On the server that it doesn't work on (a shared hosting environment), the persistence is lost anytime the app pool recycles. When it recycles the machine key changes automatically and that affects the encryption of the cookie. When the machine key changes the cookie can't be decrypted and the persistent authentication is lost. I would get around this by setting the machine key in web.config so that it always stays the same, but my web host doesn't allow this on the shared server. Is there any workaround to this problem? Thanks in advance!