HttpCreateUrlGroup function (http.h)

The HttpCreateUrlGroup function creates a URL Group under the specified server session.

Syntax

HTTPAPI_LINKAGE ULONG HttpCreateUrlGroup(
  [in]  HTTP_SERVER_SESSION_ID ServerSessionId,
  [out] PHTTP_URL_GROUP_ID     pUrlGroupId,
  [in]  ULONG                  Reserved
);

Parameters

[in] ServerSessionId

The identifier of the server session under which the URL Group is created.

[out] pUrlGroupId

A pointer to the variable that receives the ID of the URL Group.

[in] Reserved

Reserved. Must be zero.

Return value

If the function succeeds, it returns NO_ERROR

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

Value Meaning
ERROR_INVALID_PARAMETER
The ServerSessionId parameter indicates a non-existing Server Session.

The pUrlGroupId parameter is null.

The Reserved parameter is non-zero.

Remarks

URL Groups are configuration containers for a set of URLs. They are created under the server session and inherit the configuration settings of the server session. When a configuration parameter is set on the URL Group, it overrides the configuration set on the server session. For more information about the setting configurations for the URL Group, see HttpSetUrlGroupProperty.

After the URL group is created it must be associated with a request queue to receive requests. To associate the URL Group with a request queue, the application calls HttpSetUrlGroupProperty with the HttpServerBindingProperty property. If this property is not set, matching requests for the URL Group are not delivered to a request queue and the HTTP Server API generates a 503 response.

The URL Group association with a request queue is dynamic. The association with the servers session cannot be changed until either the server session or the URL Group is deleted. When a server session is deleted all of the associated URL Groups are also automatically closed.

The URL Group is initially created as an empty group. URLs must be added to the group by calling HttpAddUrlToUrlGroup.

Application may create multiple URL Groups for the following reasons:

  • To set distinct configurations for different portions of URL name space on which it is listening.
  • To set separate request queues for different portions of URL name space on which it is listening.

Applications should combine URLs into groups as much as possible; otherwise performance will degrade and increased memory consumption of the system will affect the scalability.

The HTTP Server API does not support asynchronous I/O on URL Groups.

When the URL group is no longer needed or before the application terminates it must delete the URL Group by calling HttpCloseUrlGroup.

The URL Group is created with the same version as the server session under which it is created.

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

HttpAddUrlToUrlGroup

HttpCloseUrlGroup

HttpQueryUrlGroupProperty

HttpRemoveUrlFromUrlGroup

HttpSetUrlGroupProperty