System.Web.SessionState 命名空间

System.Web.SessionState 命名空间提供类和接口,使特定数据可存储到服务器上 Web 应用程序内的单个客户端。 The System.Web.SessionState namespace supplies classes and interfaces that enable storage of data specific to a single client within a Web application on the server. 会话状态数据用于为客户端提供持续连接到应用程序的外观。 The session-state data is used to give the client the appearance of a persistent connection with the application. 状态信息可以存储在本地进程内存中,对于 Web 场配置,则可以使用 ASP.NET 状态服务或 Microsoft SQL Server 数据库存储在进程外。 State information can be stored within local process memory or, for Web farm configurations, it can be stored out of process using either the ASP.NET State service or a Microsoft SQL Server database.

HttpSessionState

提供对会话状态值以及会话级别设置和生存期管理方法的访问。Provides access to session-state values as well as session-level settings and lifetime management methods.

HttpSessionStateContainer

包含当前请求的会话状态值和会话级别设置。Contains session-state values as well as session-level settings for the current request.

SessionIDManager

管理 ASP.NET 会话状态的唯一标识符。Manages unique identifiers for ASP.NET session state.

SessionStateItemCollection

存储在会话状态中的对象的集合。A collection of objects stored in session state. 此类不能被继承。This class cannot be inherited.

SessionStateModule

为应用程序提供会话状态服务。Provides session-state services for an application. 此类不能被继承。This class cannot be inherited.

SessionStateStoreData

表示会话存储的会话状态数据。Represents session-state data for a session store.

SessionStateStoreProviderBase

定义数据存储区的会话状态提供程序所需的成员。Defines the required members of a session-state provider for a data store.

SessionStateUtility

提供会话状态模块和会话状态存储提供程序使用的 Helper 方法,为 ASP.NET 应用程序管理会话信息。Provides helper methods used by session-state modules and session-state store providers to manage session information for an ASP.NET application. 此类不能被继承。This class cannot be inherited.

StateRuntime

管理 ASP.NET 状态服务中存储的会话数据。Manages session data stored in the ASP.NET state service. 此类不能被继承。This class cannot be inherited.

接口

IHttpSessionState

定义协定以实现自定义会话状态容器。Defines the contract to implement a custom session-state container.

IPartialSessionState

在某个类型中实现时,返回零个或多个会话键的列表,这些会话键向会话状态提供程序指示必须检索哪些会话状态项。When implemented in a type, returns a list of zero or more session keys that indicate to a session-state provider which session-state items have to be retrieved.

IReadOnlySessionState

指定目标 HTTP 处理程序只需要具有对会话状态值的读访问权限。Specifies that the target HTTP handler requires only read access to session-state values. 这是一个标记接口,没有任何方法。This is a marker interface and has no methods.

IRequiresSessionState

指定目标 HTTP 处理程序需要对会话状态值具有读写访问权。Specifies that the target HTTP handler requires read and write access to session-state values. 这是一个标记接口,没有任何方法。This is a marker interface and has no methods.

ISessionIDManager

定义自定义会话状态标识符管理器必须实现的协定。Defines the contract that a custom session-state identifier manager must implement.

ISessionStateItemCollection

为 ASP.NET 会话状态使用的集合定义协定,以管理会话。Defines the contract for the collection used by ASP.NET session state to manage session.

ISessionStateModule

定义用于管理会话状态模块的接口。Defines the interface for managing session state modules.

IStateRuntime

定义 ASP.NET 状态服务管理会话数据所使用的接口。Defines the interface used by the ASP.NET state service to manage session data.

枚举

SessionStateActions

标识数据存储区中的会话项是否用于需要初始化的会话。Identifies whether a session item from a data store is for a session that requires initialization.

SessionStateBehavior

指定处理请求所需的会话支持的类型。Specifies the type of session support that is required in order to handle a request.

SessionStateMode

指定会话状态模式。Specifies the session-state mode.

委托

SessionStateItemExpireCallback

表示处理会话状态模块的 End 事件的方法。Represents the method that handles the End event of a session-state module.

注解

与不支持 cookie 的客户端可以使用会话状态。Session state can be used with clients that do not support cookies. 可以配置 ASP.NET 进行编码客户端和服务器之间传输的 URL 字符串中的会话 ID。ASP.NET can be configured to encode a session ID in the URL string that is transmitted between the client and the server.