Manages unique identifiers for ASP.NET session state.
Assembly: System.Web (in System.Web.dll)
Thetype exposes the following members.
|CreateSessionID||Creates a unique session identifier for the session.|
|Decode||Decodes a URL-encoded session identifier obtained from a cookie or the URL.|
|Encode||Encodes the session identifier for saving to either a cookie or the URL.|
|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.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetSessionID||Gets the session-identifier value from the current Web request.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|Initialize||Initializes the object with information from configuration files.|
|InitializeRequest||Performs per-request initialization of the object.|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|RemoveSessionID||Deletes the session-identifier cookie from the HTTP response.|
|SaveSessionID||Saves a newly created session identifier to the HTTP response.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
|Validate||Gets a value indicating whether a session identifier is valid.|
The class is an HTTP module that manages unique session identifiers for use with ASP.NET session state. The unique identifier for an ASP.NET session is the SessionID property, which can be accessed from the Session property of the current HttpContext or Page. The ASP.NET session identifier is a randomly generated number encoded into a 24-character string consisting of lowercase characters from a to z and numbers from 0 to 5.
By default, the SessionID value is sent in a cookie with each request to the ASP.NET application. The name of the cookie that contains the SessionID value is ASP.NET_SessionId by default. You can configure a different cookie name by setting the cookieName attribute of the sessionState Element (ASP.NET Settings Schema) to the desired cookie name.
You can replace the ASP.NET session identifier with your own custom session identifier by creating a class that inherits the class and overriding the CreateSessionID and Validate methods with your own custom implementations. For an example of overriding the class and implementing these methods, see the example provided for the CreateSessionID method.
You can replace the entire with a custom session-ID manager by creating a class that implements the ISessionIDManager interface. If your custom session-ID manager supports cookieless session identifiers, you will need to implement a solution for sending and retrieving session identifiers in the URL, such as an ISAPI filter. For more information about creating a custom session-ID manager, see ISessionIDManager.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.