SessionIDManager::CreateSessionID Method (HttpContext^)
Creates a unique session identifier for the session.
Assembly: System.Web (in System.Web.dll)
Return ValueType: System::String^
A unique session identifier.
This method is not intended to be called from application code.
Themethod returns a unique session identifier that 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.
Notes to Inheritors:
You can supply a custom session identifier to be used by ASP.NET session state by creating a class that inherits the SessionIDManager class and overriding the and Validate methods with your own custom implementations. If your custom session ID does not meet the character constraints enforced by the default implementation of the Validate method, you should override the Validate method to provide validation of your custom session identifier. In this case, the SessionIDManager class will ensure that your custom session identifier is URL encoded in the HTTP response and URL decoded from the HTTP request using the Encode and Decode methods, respectively.
To use the custom class demonstrated in this example, configure the sessionIDManagerType attribute of the sessionState Element (ASP.NET Settings Schema) element, as shown in the following example.
<sessionState Mode="InProc" stateConnectionString="tcp=127.0.0.1:42424" stateNetworkTimeout="10" sqlConnectionString="data source=127.0.0.1;Integrated Security=SSPI" sqlCommandTimeout="30" customProvider="" cookieless="false" regenerateExpiredSessionId="false" timeout="20" sessionIDManagerType="Your.ID.Manager.Type, CustomAssemblyNameInBinFolder" />
Available since 2.0