Last post Jul 16, 2014 09:47 AM by BrockAllen
Jul 15, 2014 01:57 PM|uid989718|LINK
On my log in page I added a check box option so my users can stay logged in (60 days) even after they close there browser. If the check box is checked then my code behind adds a persistent cookie to the response.
Everything works as it should on the localhost but on the server it does not. It appears ever time the application or application pool is restarted the users of my website have to re log in again. Using Firefox I found the authentication cookie (.ASPXAUTH)
with the correct expiration date of 60 days out but still forced to re log in.
Jul 15, 2014 01:59 PM|BrockAllen|LINK
You need to explicitly configure the <machineKey> element in web.config and sync that element's values across all machines in your server farm.
Jul 15, 2014 05:08 PM|uid989718|LINK
Can you explain in more detail. Thanks!
Jul 16, 2014 04:19 AM|Michelle Ge - MSFT|LINK
According to your description, I think you should make some break points to debug steps by steps, then to check if you have got the Login data.
There is an article about this, it suggests creating a cookie with expiry of 60 days, as we login we should check this cookie value.
For more information, please refer to the link below:
Hope it's useful for you.
Jul 16, 2014 09:37 AM|uid989718|LINK
What am I suppose to put in the <machineKey> element in my web.config file?
Jul 16, 2014 09:47 AM|BrockAllen|LINK