开发者

Is it possible to recycle IIS application pools without losing user sessions?

开发者 https://www.devze.com 2023-01-27 10:54 出处:网络
We\'re currently deploying code to live pretty reguarly at the moment, but the down side is destroying user session data.

We're currently deploying code to live pretty reguarly at the moment, but the down side is destroying user session data.

Is there a way of being able to recycle I开发者_如何转开发IS without loosing session data, or is persisiting session state in SQL server or alike the only way?


In-memory session state is stored in the memory of the IIS worker process. When you restart the application pool you are effectively stopping and restarting the worker process, so whatever state is held by the worker process, including all session objects, is lost. So, yes, you need store session data outside the IIS worker process, such as in SQL, in order to not "destroy" users' session data.

0

精彩评论

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

关注公众号