HttpSetServerSessionProperty function (http.h)
The HttpSetServerSessionProperty function sets a new server session property or modifies an existing property on the specified server session.
Syntax
HTTPAPI_LINKAGE ULONG HttpSetServerSessionProperty(
[in] HTTP_SERVER_SESSION_ID ServerSessionId,
[in] HTTP_SERVER_PROPERTY Property,
[in] PVOID PropertyInformation,
[in] ULONG PropertyInformationLength
);
Parameters
[in] ServerSessionId
The server session for which the property is set.
[in] Property
A member of the HTTP_SERVER_PROPERTY enumeration that describes the property type that is set. This can be one of the following.
Property | Meaning |
---|---|
|
Modifies or sets the state of the server session. The state can be either enabled or disabled; the default state is enabled. |
|
Modifies or sets the server session connection timeout limits. |
|
Modifies or sets the bandwidth throttling for the server session. By default, the HTTP Server API does not limit bandwidth.
Note This value maps to the generic HTTP_QOS_SETTING_INFO structure with QosType set to HttpQosSettingTypeBandwidth.
|
|
Enables or disables logging for the server session. This property sets only centralized W3C and centralized binary logging. By default, logging is not enabled. |
|
Enables kernel mode server side authentication for the Basic, NTLM, Negotiate, and Digest authentication schemes. |
|
Enables kernel mode server side authentication for the Kerberos authentication scheme. |
|
Enables server side authentication that uses a channel binding token (CBT). |
[in] PropertyInformation
A pointer to the buffer that contains the property data.
pPropertyInformation points to a property data structure, listed in the following table, based on the property that is set.
Property | Structure |
---|---|
HttpServerStateProperty | HTTP_STATE_INFO |
HttpServerLoggingProperty | HTTP_LOGGING_INFO |
HttpServerQosProperty | HTTP_QOS_SETTING_INFO |
HttpServerTimeoutsProperty | HTTP_TIMEOUT_LIMIT_INFO |
HttpServerAuthenticationProperty | HTTP_SERVER_AUTHENTICATION_INFO |
HttpServerExtendedAuthenticationProperty | HTTP_SERVER_AUTHENTICATION_INFO |
HttpServerChannelBindProperty | HTTP_CHANNEL_BIND_INFO |
[in] PropertyInformationLength
The length, in bytes, of the buffer pointed to by the pPropertyInformation parameter.
Return value
If the function succeeds, it returns NO_ERROR
If the function fails, it returns one of the following error codes.
Value | Meaning |
---|---|
|
The property type specified in the Property parameter is not supported for server sessions.
The pPropertyInformation parameter is NULL. The PropertyInformationLength parameter is zero. The ServerSessionId parameter does not contain a valid server session. The application does not have permission to set the server session properties. Only the application that created the server session can set the properties. |
Remarks
Server sessions are top level configuration containers for configuration data that applies to all of the URL groups created under them. The server session is created with HttpCreateServerSession.
The pPropertyInformation parameter points to the configuration structure for the property type that is set. The PropertyInformationLength parameter specifies the size, in bytes, of the configuration structure. For example, when setting the HttpServerTimeoutsProperty the pPropertyInformation parameter must point to a buffer that is at least equal to the size of the HTTP_TIMEOUT_LIMIT_INFO structure.
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