Directory Services

Creating and Maintaining a Service Connection Point

The guiding principle for publishing with an SCP is that it must contain up-to-date information about the service instance. Otherwise, clients who bind to the SCP retrieve stale information. Your service installation program that creates an SCP specifies the initial values for the SCPs attributes. Then, when the service instance starts up, it must locate the SCP and update the attribute values, if necessary. In this way, interested clients are assured the most up-to-date information.

After creating the SCP, your service installation program performs two additional steps that enable your service to update the SCP.

The service installation program 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 installation program creates an SCP, it must read the objectGUID of the newly-created object and cache it in the registry of the service's host computer. You can 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.


Where <VENDOR-NAME> and <PRODUCT-NAME> identify the vendor and product.

When the service starts up, 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 out of date, the service updates them. Values that the service might need to update include keywords, serviceBindingInformation, serviceDNSName, and serviceDNSNameType.

For sample code that creates an SCP, see Creating a Service Connection Point.

For sample code updates the SCP, see Updating a Service Connection Point.