IIS 7 Application Pool work process life and Sessi

2019-05-10 10:40发布

In IIS7 Application Pool there is a setting Idle-time out default is 20 min, which says:

Amount of time(in minutes) a worker process will remain idle before it shuts down, A worker process is idle if it is not processing requests and no new requests are received.

My question is, if the worker process shut down because of the time-out time, does the session created by application which is hosted in this worker process get lost?

1条回答
甜甜的少女心
2楼-- · 2019-05-10 10:56

Yes -- the session data is tied to the app pool worker process, so once the worker gets shut down, the session data is lost.

The default behavior is to store session variables in the memory space of the ASP.NET worker process.

(Of course, this assumes you're using InProc as the session mode. If you're using the database, then it will persist after the worker gets shut down.)

查看更多
登录 后发表回答