
458
|
Chapter 20: web.config Reference
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
<sessionState>
<sessionState
mode="Off|Inproc|StateServer|SQLServer"
cookieless=boolean
timeout=numMinutes
stateNetworkTimeout=numSeconds
stateConnectionString="tcpip=server:port"
sqlConnectionString=connString />
Scope
Machine, Application
Attributes
mode
Specifies whether session state is enabled, and if so, how the state data will be
stored. Valid values are as follows:
Off
The session state is disabled.
InProc
The session state data will be stored in memory on the local server. This
is the same model as session state in classic ASP. This session state mode
does not allow session state to be shared across servers in a web farm.
StateServer
The session state data will be stored in memory in a special NT state
service on a designated state server. This session state mode allows
session state to be shared across servers in a web farm.
SQLServer
The session state data will be stored in a special SQL Server database on
a designated SQL Server. This session state mode allows session state to
be shared across servers in a web farm. This mode also requires running
a SQL query (which is included with the .NET Framework SDK) to set
up the SQL Server database.
The default is
InProc.
cookieless
Specifies whether or not cookies will be used to associate users with specific ...