편집

다음을 통해 공유


ISessionIDManager.InitializeRequest(HttpContext, Boolean, Boolean) Method

Definition

Performs per-request initialization of the SessionIDManager object.

public:
 bool InitializeRequest(System::Web::HttpContext ^ context, bool suppressAutoDetectRedirect, [Runtime::InteropServices::Out] bool % supportSessionIDReissue);
public bool InitializeRequest (System.Web.HttpContext context, bool suppressAutoDetectRedirect, out bool supportSessionIDReissue);
abstract member InitializeRequest : System.Web.HttpContext * bool * bool -> bool
Public Function InitializeRequest (context As HttpContext, suppressAutoDetectRedirect As Boolean, ByRef supportSessionIDReissue As Boolean) As Boolean

Parameters

context
HttpContext

The HttpContext object that contains information about the current request.

suppressAutoDetectRedirect
Boolean

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

supportSessionIDReissue
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.

Returns

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

Remarks

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.

Applies to