I use InProc mode to store session (sessionState mode="InProc" cookieless="false" timeout="240"), I know sometimes the session will lost in InProc mode,what wi开发者_运维问答ll be happened when the session lost during accessing a webpage?
Thanks!In the Global asax you can handle a InProc Session end event:
void Session_End(Object sender, EventArgs E)
{
// do something
}
A few reasons an InProc Session will died:
- Your IIS Application Pool has died, reset or etc.
- ASP.NET Worker Process (Aspnet_wp.exe) is recycled unexpectedly, overriding your bin or web.config
If an event occurs that causes the Application Pool to be recycled then InProc
session will be lost. If the application is servicing a request, then I don't believe that the session associated with that request is lost, at least not until the response is served anyway.
精彩评论