Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session Timeout

Status
Not open for further replies.

ukwebsite

Programmer
Dec 9, 2000
82
GB

How long does it take a session to timeout? Is there any other ways that the session will clear e.g. closing the browser? Matthew Wilde
matthew@ukwebsite.com
 
The session timeout setting can be defined in two places. You can define it in the code directly, but commonly it is defined in the properties of IIS on the server.

The reasons the session will clear, other than timeout are, if the browser closes, or if you give a session.abandon command. That will force the session object to die. The money's gone, the brain is shot.....but the liquor we still got.
 
Thanks so how do you define it in the code? Matthew Wilde
matthew@ukwebsite.com
 
Session.Timeout = XX

where XX is the time in minutes. Ladyhawk. [idea]
** ASP/VB/Java Programmer **
 
Here's a tip that might save you some headaches.

No matter where you place the
Code:
Session.Timeout = n
in your page, the session won't time out until the page has fully executed all of the script.

I used to think that you could place that command in the middle of the script and the script following it will act as if the session has timed out. Not the case.

ToddWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top