System.Web.SessionState.SessionIDManager Class

Manages unique identifiers for ASP.NET session state.

See Also: SessionIDManager Members


public class SessionIDManager : ISessionIDManager


The System.Web.SessionState.SessionIDManager 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 HttpSessionState.SessionID property, which can be accessed from the System.Web.HttpContext.Session property of the current System.Web.HttpContext or System.Web.UI.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 HttpSessionState.SessionID value is sent in a cookie with each request to the ASP.NET application. The name of the cookie that contains the HttpSessionState.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.

If you want to disable the use of cookies in your ASP.NET application and still make use of session state, you can configure your application to store the session identifier in the URL instead of a cookie by setting the cookieless attribute of the sessionState element to true in the Web.config file for your application. For more information, see the HttpSessionStateContainer.IsCookieless property.


Namespace: System.Web.SessionState
Assembly: System.Web (in System.Web.dll)
Assembly Versions: