HttpSessionState.Mode Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the current session-state mode.
public:
property System::Web::SessionState::SessionStateMode Mode { System::Web::SessionState::SessionStateMode get(); };
public System.Web.SessionState.SessionStateMode Mode { get; }
member this.Mode : System.Web.SessionState.SessionStateMode
Public ReadOnly Property Mode As SessionStateMode
Property Value
One of the SessionStateMode values.
Examples
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>
Remarks
For information about how to configure your server for StateServer or SQLServer session-state storage, see ASP.NET Session State Overview.
Applies to
See also
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈