- Basic Concepts
- Application State Data
- Session State Data
- Session Tracking
- State Management Examples
Session Tracking
An application can be configured to use either cookies or query strings to track sessions. To configure an application not to use cookies to track sessions, you need to modify the SessionState section of the Web.Config file. The session collection contains many methods and attributes. The five main attributes used to configure session state management in ASP.NET are listed here:
Mode: Specifies the persistence mode used to store session state. There are four modes to choose from: Off, Inproc, StateServer, and SQLServer.
Timeout: Specifies the number of minutes of idle time before the session shuts down.
ConnectionString: Required only if Mode is set to StateServer. ConnectionString specifies the port as well as the name or address of the server where session state is stored.
SQLConnectionString: Required when Mode is set to SQLServer. It specifies the connection string needed to connect to a database server.
Cookieless: A Boolean value that indicates whether the application should use cookies or munged URLs to track sessions.