Name
<sessionState>
Synopsis
<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:
-
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 sessions. If set to
True, the session identifier will be automatically munged into the URL for each request. This requires that your application use relative URLs to work correctly. The default isFalse.-
timeout Specifies ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access