Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content

System.Web.SessionState Namespace

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

Session state can be used with clients that do not support cookies. ASP.NET can be configured to encode a session ID in the URL string that is transmitted between the client and the server.

Public classHttpSessionStateProvides access to session-state values as well as session-level settings and lifetime management methods.
Public classHttpSessionStateContainerContains session-state values as well as session-level settings for the current request.
Public classSessionIDManagerManages unique identifiers for ASP.NET session state.
Public classSessionStateItemCollectionA collection of objects stored in session state. This class cannot be inherited.
Public classSessionStateModuleProvides session-state services for an application. This class cannot be inherited.
Public classSessionStateStoreDataRepresents session-state data for a session store.
Public classSessionStateStoreProviderBaseDefines the required members of a session-state provider for a data store.
Public classSessionStateUtilityProvides 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.
Public classStateRuntimeManages session data stored in the ASP.NET state service. This class cannot be inherited.

Public interfaceIHttpSessionStateDefines the contract to implement a custom session-state container.
Public interfaceIPartialSessionStateWhen 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.
Public interfaceIReadOnlySessionStateSpecifies that the target HTTP handler requires only read access to session-state values. This is a marker interface and has no methods.
Public interfaceIRequiresSessionStateSpecifies that the target HTTP handler requires read and write access to session-state values. This is a marker interface and has no methods.
Public interfaceISessionIDManagerDefines the contract that a custom session-state identifier manager must implement.
Public interfaceISessionStateItemCollectionDefines the contract for the collection used by ASP.NET session state to manage session.
Public interfaceIStateRuntimeDefines the interface used by the ASP.NET state service to manage session data.

Public delegateSessionStateItemExpireCallbackRepresents the method that handles the End event of a session-state module.

Public enumerationSessionStateActionsIdentifies whether a session item from a data store is for a session that requires initialization.
Public enumerationSessionStateBehaviorSpecifies the type of session support that is required in order to handle a request.
Public enumerationSessionStateModeSpecifies the session-state mode.

Community Additions

© 2015 Microsoft