ISessionIDManager.RemoveSessionID(HttpContext) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Deletes the session identifier from the cookie or from the URL.
public:
void RemoveSessionID(System::Web::HttpContext ^ context);
public void RemoveSessionID (System.Web.HttpContext context);
abstract member RemoveSessionID : System.Web.HttpContext -> unit
Public Sub RemoveSessionID (context As HttpContext)
Parameters
- context
- HttpContext
The current HttpContext object that references server objects used to process HTTP requests (for example, the Request and Response properties).
Examples
The following code example implements the RemoveSessionID method.
public void RemoveSessionID(HttpContext context)
{
context.Response.Cookies.Remove(pConfig.CookieName);
}
Public Sub RemoveSessionID(context As HttpContext) _
Implements ISessionIDManager.RemoveSessionID
context.Response.Cookies.Remove(pConfig.CookieName)
End Sub
Remarks
The SessionStateModule calls the RemoveSessionID method during the HttpApplication.ReleaseRequestState event to remove the session identifier from the HttpResponse.Cookies collection if a new session was created but was not used.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort beschikbaar: In de loop van 2024 zullen we GitHub-problemen geleidelijk uitfaseren als het feedbackmechanisme voor inhoud en deze vervangen door een nieuw feedbacksysteem. Zie voor meer informatie:Feedback verzenden en weergeven voor