Session Variables

  • Thread starter Thread starter TC
  • Start date Start date
T

TC

How long does it take a session variable to expire or loose it´s value, or
it the value stored until the client closes the browser window?

TIA
 
Hi TC,

The default is 20 minutes after the last request from the client. As the
server has no way of knowing what the client does after receiving a request,
it is not dependent upon the client.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
How can I change this, or do I have to validate in every page that the
session variable still has some value?

Thanks
 
Hi TC,

As Sessions time out (and you can't change that, only the time interval), it
is ALWAYS a good idea to check for and handle the eventuality that some
Sessions will time out. Changing the timeout is usually a bad idea, as it
causes more memory usage on the server. Each Session allocates memory, and
the more Sessions that are alive, the more memory will be used at any given
point.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
Back
Top