Session Management

Overview

The built-in Session object provides several methods and properties that you can use to manage an application session. This sample demonstrates the use of one of these, the Timeout property.

ASP creates and maintains one Session object for each client browser connected to the server. The object holds session-state information, and it remains in memory until the connection is either properly terminated or inactive for a certain amount of time. You can set this by using the Session.Timeout property.

Code Tour

This sample simply sets the Timeout property of the session to 25 minutes. Once a client browser accesses this script, if 25 minutes elapse in which the browser makes no requests on the server, the session will be terminated, and the associated Session object will be destroyed.

Location

The VBScript and JScript versions of this script are available in the IIS samples directory, at ...\asp\applications\Timeout_VBScript.asp and ...\asp\applications\Timeout_JScript.asp.