HttpSessionState.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

プロパティ値

SessionStateMode値の 1 つ。

次のコード例では、 mode セッション属性を Web.config ファイル内の SQLServer に設定します。 SQL Server セッション モードの場合は、sqlConnectionString 属性も必要です。

<configuration>
  <system.web>
    <sessionState
      mode="SQLServer"
      sqlConnectionString="Data Source=localhost;Integrated Security=SSPI"
      cookieless="true"
      timeout="30" />
  </system.web>
</configuration>

注釈

StateServer または SQLServer セッション状態ストレージ用にサーバーを構成する方法については、「ASP.NET セッション状態の概要を参照してください。

適用対象

こちらもご覧ください