SessionStateModule 類別

定義

提供應用程式的工作階段狀態服務。 此類別無法獲得繼承。

public ref class SessionStateModule sealed : System::Web::IHttpModule
public ref class SessionStateModule sealed : System::Web::SessionState::ISessionStateModule
public sealed class SessionStateModule : System.Web.IHttpModule
public sealed class SessionStateModule : System.Web.SessionState.ISessionStateModule
type SessionStateModule = class
    interface IHttpModule
type SessionStateModule = class
    interface ISessionStateModule
    interface IHttpModule
Public NotInheritable Class SessionStateModule
Implements IHttpModule
Public NotInheritable Class SessionStateModule
Implements ISessionStateModule
繼承
SessionStateModule
實作

備註

SessionStateModule 是 ASP。NET 的預設會話狀態處理常式。 它會寫入會話資料,並從會話狀態存放區擷取它,並引發 Session_OnStartSession_OnEnd 事件。 如需如何使用 ASP.NET 會話狀態來儲存和擷取使用者會話值的詳細資訊,請參閱 ASP.NET 會話狀態概觀

您可以將 取代 SessionStateModule 為管理會話狀態之 IHttpModule 介面的自訂實作。 如需自訂會話狀態模組的範例,請參閱 SessionStateUtility 類別概觀。

建構函式

SessionStateModule()

初始化 SessionStateModule 類別的新執行個體。

方法

Dispose()

SessionStateModule 物件從記憶體釋放之前,執行最後的清除程式碼。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
Init(HttpApplication)

SessionStateModule 物件建立時,呼叫初始化程式碼。

MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ReleaseSessionState(HttpContext)

釋放指定 HttpContext 的工作階段狀態。

ReleaseSessionStateAsync(HttpContext)

以非同步的方式釋放指定 HttpContext 的工作階段狀態。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

事件

End

發生於工作階段結束時。

Start

建立工作階段時所發生的事件。

適用於

另請參閱