HttpSessionStateWrapper Class
Encapsulates the HTTP intrinsic object that provides access to session-state values, session-level settings, and lifetime management methods.
Assembly: System.Web (in System.Web.dll)
The HttpSessionStateWrapper type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | HttpSessionStateWrapper | Initializes a new instance of the HttpSessionStateWrapper class. |
| Name | Description | |
|---|---|---|
![]() | CodePage | Gets or sets the character-set identifier for the current session. (Overrides HttpSessionStateBase::CodePage.) |
![]() | Contents | Gets a reference to the current session-state object. (Overrides HttpSessionStateBase::Contents.) |
![]() | CookieMode | Gets a value that indicates whether the application is configured for cookieless sessions. (Overrides HttpSessionStateBase::CookieMode.) |
![]() | Count | Gets the number of items in the session-state collection. (Overrides HttpSessionStateBase::Count.) |
![]() | IsCookieless | Gets a value that indicates whether the session ID is embedded in the URL. (Overrides HttpSessionStateBase::IsCookieless.) |
![]() | IsNewSession | Gets a value that indicates whether the session was created during the current request. (Overrides HttpSessionStateBase::IsNewSession.) |
![]() | IsReadOnly | Gets a value that indicates whether the session is read-only. (Overrides HttpSessionStateBase::IsReadOnly.) |
![]() | IsSynchronized | Gets a value that indicates whether access to the collection of session-state values is synchronized (thread safe). (Overrides HttpSessionStateBase::IsSynchronized.) |
![]() | Item[Int32] | Gets or sets a session value by using the specified index. (Overrides HttpSessionStateBase::Item[Int32].) |
![]() | Item[String] | Gets or sets a session value by using the specified name. (Overrides HttpSessionStateBase::Item[String].) |
![]() | Keys | Gets a collection of the keys for all values that are stored in the session-state collection. (Overrides HttpSessionStateBase::Keys.) |
![]() | LCID | Gets or sets the locale identifier (LCID) of the current session. (Overrides HttpSessionStateBase::LCID.) |
![]() | Mode | Gets the current session-state mode. (Overrides HttpSessionStateBase::Mode.) |
![]() | SessionID | Gets the unique identifier for the session. (Overrides HttpSessionStateBase::SessionID.) |
![]() | StaticObjects | Gets a collection of objects that are declared by object elements that are marked as server controls and scoped to the current session in the application's Global.asax file. (Overrides HttpSessionStateBase::StaticObjects.) |
![]() | SyncRoot | Gets an object that can be used to synchronize access to the collection of session-state values. (Overrides HttpSessionStateBase::SyncRoot.) |
![]() | Timeout | Gets or sets the time, in minutes, that can elapse between requests before the session-state provider ends the session. (Overrides HttpSessionStateBase::Timeout.) |
| Name | Description | |
|---|---|---|
![]() | Abandon | Cancels the current session. (Overrides HttpSessionStateBase::Abandon().) |
![]() | Add | Adds an item to the session-state collection. (Overrides HttpSessionStateBase::Add(String, Object).) |
![]() | Clear | Removes all keys and values from the session-state collection. (Overrides HttpSessionStateBase::Clear().) |
![]() | CopyTo | Copies the collection of session-state values to a one-dimensional array, starting at the specified index in the array. (Overrides HttpSessionStateBase::CopyTo(Array, Int32).) |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetEnumerator | Returns an enumerator that can be used to read all the session-state variable names in the current session. (Overrides HttpSessionStateBase::GetEnumerator().) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | Remove | Deletes an item from the session-state collection. (Overrides HttpSessionStateBase::Remove(String).) |
![]() | RemoveAll | Removes all keys and values from the session-state collection. (Overrides HttpSessionStateBase::RemoveAll().) |
![]() | RemoveAt | Deletes the item at the specified index from the session-state collection. (Overrides HttpSessionStateBase::RemoveAt(Int32).) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The HttpSessionStateWrapper class derives from the HttpSessionStateBase class and serves as a wrapper for the HttpSessionState class. This class exposes the functionality of the HttpSessionState class and exposes the HttpSessionStateBase type. The HttpSessionStateBase class lets you replace the original implementation of the HttpSessionState class in your application with a custom implementation, such as when you perform unit testing outside the ASP.NET pipeline.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.


