HttpSetServerSessionProperty function

The HttpSetServerSessionProperty function sets a new server session property or modifies an existing property on the specified server session.

Syntax


ULONG HttpSetServerSessionProperty(
  _In_ HTTP_SERVER_SESSION_ID ServerSessionId,
  _In_ HTTP_SERVER_PROPERTY   Property,
  _In_ PVOID                  pPropertyInformation,
  _In_ ULONG                  PropertyInformationLength
);

Parameters

ServerSessionId [in]

The server session for which the property is set.

Property [in]

A member of the HTTP_SERVER_PROPERTY enumeration that describes the property type that is set. This can be one of the following.

PropertyMeaning
HttpServerStateProperty

Modifies or sets the state of the server session. The state can be either enabled or disabled; the default state is enabled.

HttpServerTimeoutsProperty

Modifies or sets the server session connection timeout limits.

HttpServerQosProperty

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

Enables or disables logging for the server session. This property sets only centralized W3C and centralized binary logging. By default, logging is not enabled.

HttpServerAuthenticationProperty

Enables kernel mode server side authentication for the Basic, NTLM, Negotiate, and Digest authentication schemes.

HttpServerExtendedAuthenticationProperty

Enables kernel mode server side authentication for the Kerberos authentication scheme.

HttpServerChannelBindProperty

Enables server side authentication that uses a channel binding token (CBT).

 

pPropertyInformation [in]

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.

PropertyStructure
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

 

PropertyInformationLength [in]

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.

ValueMeaning
ERROR_INVALID_PARAMETER

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Http.h

Library

Httpapi.lib

DLL

Httpapi.dll

See also

HTTP Server API Version 2.0 Functions
HttpCreateServerSession
HttpSetServerSessionProperty
HttpQueryServerSessionProperty
HttpCloseServerSession

 

 

Show: