WebApplication.SessionTimeout Questions

What is the purpose of the WebApplication.SessionTimeout (as opposed to the WebSession.Timeout). I understand what it does, it’s the number of seconds that a session remains in memory after the session ends.

But what is it for? Why would you want to keep a session in memory after it has ended? Is there some pooling going on? What are the implications of setting this value very low e.g. 1 second?

I’m struggling with memory issues on a standalone web application and I’m very keen that resources are released immediately when a session ends.

Thanks in advance

I believe it’s there for sporadic web connections. So if your connection drops temporarily and reconnects within the Timeout period the user won’t even know that it was disconnected.

In just about every server language (php, asp, Perl, etc…) there is a period of time that a session will stay around to avoid the overhead of starting up a new one if the user comes “right back”. This property allows you to tweak this time up or down based on your system/user requirements. I don’t suggest setting it too low though. It defines the amount of time that passes since the last communication from the browser to when the session is actually closed. Too low and you could disconnect active users.

FWIW, most users will never touch that property.