Επεξεργασία

Κοινή χρήση μέσω


SessionIDManager.GetSessionID(HttpContext) Method

Definition

Gets the session-identifier value from the current Web request.

public:
 virtual System::String ^ GetSessionID(System::Web::HttpContext ^ context);
public string GetSessionID (System.Web.HttpContext context);
abstract member GetSessionID : System.Web.HttpContext -> string
override this.GetSessionID : System.Web.HttpContext -> string
Public Function GetSessionID (context As HttpContext) As String

Parameters

context
HttpContext

The current HttpContext object that references server objects used to process HTTP requests (for example, the Request and Response properties).

Returns

The current SessionID.

Implements

Exceptions

The length of the session-identifier value retrieved from the HTTP request exceeds the SessionIDMaxLength value.

Remarks

This method is not intended to be called from application code.

The SessionStateModule calls the GetSessionID method during the AcquireRequestState event to retrieve the SessionID from the current HttpRequest.

Applies to

See also