开发者

Can a FormsAuthenticationTicket survive an app pool recycle?

开发者 https://www.devze.com 2023-01-15 05:47 出处:网络
I am looking for a solution where we can make a FormsAuthenticationTicket (and corresponding cookie) with a very long expiration p开发者_开发知识库eriod. This is possible by setting a high value or us

I am looking for a solution where we can make a FormsAuthenticationTicket (and corresponding cookie) with a very long expiration p开发者_开发知识库eriod. This is possible by setting a high value or using a sliding expiration, but when the application pool of the website is recycled, the FormsAuthenticationTicket disappears (I think), the cookie gets invalid and the user is asked to login again.

Is there any way around this?


Set static machineKeys instead of the auto generated. This way the FormsAuthenticationTicket will survive app pool recycling.

0

精彩评论

暂无评论...
验证码 换一张
取 消