大网数据广告活动
域与目录服务

Creating and Maintaining a Service Connection Point

· 52CE 我爱测

When publishing with an SCP, remember that it must contain current data about the service instance.

When publishing with an SCP, remember that it must contain current data about the service instance. Otherwise, clients that bind to the SCP retrieve outdated data. Your service installer, that creates an SCP, specifies the initial values for the SCPs attributes. Then, when the service instance starts, it must locate the SCP and update the attribute values, if necessary. In this way, clients are assured the most current data.

After creating the SCP, your service installer performs two additional steps that enable your service to update the SCP:

  • Set ACEs in the security descriptor of the SCP object to enable the service to modify SCP attributes at run time. For more information and a code example, see Enabling Service Account to Access SCP Properties.
  • Cache the objectGUID of the SCP in the registry on the service host computer. The service retrieves the cached GUID to bind to the SCP to verify and update its attributes.

The service installer caches the SCP's objectGUID rather than its DN. The objectGUID never changes, regardless of whether the SCP is moved or renamed. The DN can change if an administrator moves or renames the SCP. For example, if you create an SCP as a child of a computer object, the distinguished name of the SCP changes if the computer is renamed or moved to a different domain or organizational unit.

When a service installer creates an SCP, it must read the objectGUID of the newly created object and cache it in the registry of the service host computer. Use the IADs::get_GUID method to get the objectGUID value in string format suitable for binding. Cache the GUID string as a value under the following registry key.

HKEY_LOCAL_MACHINE
   vendor name
      product name

Where "vendor name" and "product name" identify the vendor and product.

When the service starts, it retrieves the cached GUID string from the registry and uses it to bind to the SCP. The service reads the important SCP attributes and compares them to current values. If the SCP values are outdated, the service updates them. Values that the service might require to update include keywords, serviceBindingInformation, serviceDNSName, and serviceDNSNameType.

Examples

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)

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

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