HttpSessionState::Mode Property
.NET Framework (current version)
Gets the current session-state mode.
Assembly: System.Web (in System.Web.dll)
For information about how to configure your server for StateServer or SQLServer session-state storage, see ASP.NET Session State Overview.
The following code example sets the mode session attribute to SQLServer in the Web.config file. For SQL Server session mode, the sqlConnectionString attribute is also required.
<configuration>
<system.web>
<sessionState
mode="SQLServer"
sqlConnectionString="Data Source=localhost;Integrated Security=SSPI"
cookieless="true"
timeout="30" />
</system.web>
</configuration>
.NET Framework
Available since 1.1
Available since 1.1
Show: