ISessionIDManager.InitializeRequest Method (HttpContext, Boolean, Boolean)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Performs per-request initialization of the SessionIDManager object.

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

bool InitializeRequest(
	HttpContext context,
	bool suppressAutoDetectRedirect,
	out bool supportSessionIDReissue


Type: System.Web.HttpContext

The HttpContext object that contains information about the current request.

Type: System.Boolean

true if the session-ID manager should redirect to determine cookie support; otherwise, false to suppress automatic redirection to determine cookie support.

Type: System.Boolean

When this method returns, contains a Boolean that indicates whether the ISessionIDManager object supports issuing new session IDs when the original ID is out of date. This parameter is passed uninitialized.

Session ID reuse is appropriate when the session-state ID is encoded on a URL and the potential exists for the URL to be shared or emailed.

If a custom session-state implementation partitions cookies by virtual path, session state should also be supported.

Return Value

Type: System.Boolean

true to indicate that the initialization performed a redirect; otherwise, false.

The InitializeRequest method is called for each request handled by the ISessionIDManager object. Use the InitializeRequest method to initialize per-request data for the SessionIDManager object.

When the suppressAutoDetectRedirect parameter is true, the ISessionIDManager object should not use redirection to determine whether the browser supports cookies.

The supportSessionIDReissue parameter should be returned false if cookies are used for session identification; otherwise, return true if your ISessionIDManager implementation supports re-issuing session IDs.

.NET Framework
Available since 2.0
Return to top