大网数据广告活动
Web服务器与PHP

Processing Registrations

· 52CE 我爱测

The HTTP Server APIs use the routing database to apply access checks during registrations.

The HTTP Server APIs use the routing database to apply access checks during registrations. A registration for a UrlPrefix must pass a series of access checks to ensure that the user registering for the namespace has access rights. Use the HttpAddUrl function to add a new registration.

To add a new registration with HttpAddUrl

  1. If the port number in the UrlPrefix has reservations or registrations for a scheme different from the scheme in the UrlPrefix, the registration fails. HTTP and HTTPS cannot be supported on the same port.
  2. The registration is slotted into the appropriate bucket for the registration. The buckets are based on the host type of the URL as outlined in the Routing Incoming Requests section. The following steps are relative to this particular bucket.
  3. If a duplicate registration entry exists, return an error code.
  4. Select reservation entries with scheme, host and port components that are equal to those of the UrlPrefix. From these, locate the entry with the longest relativeUri match. If the entry exists, check permissions based on the ACL associated with that entry and return success. If the entry does not exist, return an ERROR_ALREADY_EXISTS code.

The following examples illustrate the process to install a registration in the routing database. Reservations 1 and 2 exist in the routing database.

  • Reservation 1: https://+:80/vroot/subdir/ for User A and User C. This reservation is placed in the "+" bucket.
  • Reservation 2: https://adatum.com:80/vroot/ for User B. This reservation is placed in the "Explicit Host" bucket.
  • Registration: https://+:80/vroot/subdir/ by User B fails due to reservation 1.
  • Registration: https://adatum.com:80/vroot/subdir/ by User B succeeds due to reservation 2.
  • Registration: https://adatum.com:80/vroot/subdir/ by User C fails due to the more explicit reservation 2. The strong wildcard reservation does not have meaning within the context of the explicit reservation or registration.
  • Registration: https://+:80/vroot/subdir/ by User A succeeds due to reservation 1.
  • Registration: https://adatum.com:80/vroot/anotherdir/ by User B succeeds due to reservation 2.

The access check for registration does not include checks for delegation privileges. There are no access checks based on reservations (see HttpRemoveUrl). The only requirement for deleting a registration us that the calling process must have created the registration.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。