HttpCloseServerSession function (http.h)

The HttpCloseServerSession function deletes the server session identified by the server session ID. All remaining URL Groups associated with the server session will also be closed.

Syntax

HTTPAPI_LINKAGE ULONG HttpCloseServerSession(
  [in] HTTP_SERVER_SESSION_ID ServerSessionId
);

Parameters

[in] ServerSessionId

The ID of the server session that is closed.

Return value

If the function succeeds, it returns NO_ERROR

If the function fails, it can return one of the following error codes.

Value Meaning
ERROR_INVALID_PARAMETER
The Server Session does not exist.

The application does not have permission to close the server session. Only the application that created the server session can close the session.

Remarks

Applications must call HttpCloseUrlGroup before calling HttpCloseServerSession to close the all the URL Groups associated with the server session.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header http.h
Library Httpapi.lib
DLL Httpapi.dll

See also

HTTP Server API Version 2.0 Functions

HttpCloseServerSession

HttpCreateServerSession

HttpQueryServerSessionProperty

HttpSetServerSessionProperty