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

Referral Chasing with IDirectorySearch

· 52CE 我爱测

A referral is the mechanism that a directory server uses to direct a client to another server when it does not contain sufficient data about the object requested by a query.

A referral is the mechanism that a directory server uses to direct a client to another server when it does not contain sufficient data about the object requested by a query.

In a one-level or subtree search, referrals are returned for known, immediately subordinate domain, schema, or configuration containers only; that is, child domains that are direct descendants. For more information, see Search Scope.

In a directory, not all data is available on a single server, rather, it is distributed over several different servers across the network. If the servers share the data that other servers can provide, they can provide referrals to a client when a requested query cannot be resolved on the originating server. For example, when a client asks Server A to query a user object (U), then A can suggest that the client continue the search on Server B if U does not reside on A, but is identified to be on B. The client has the choice to pursue the referral or not. Referrals free the client from having to possess previous knowledge of the capability of each server, but the client must specify the type of referrals a server should perform.

To enable or disable referral chasing, set an ADS_SEARCHPREF_CHASE_REFERRALS search option with an ADSTYPE_INTEGER value that contains one of the ADS_CHASE_REFERRALS_ENUM enumeration values in the ADS_SEARCHPREF_INFO array passed to the IDirectorySearch::SetSearchPreference method.

The following code example shows how to enable chase referrals.

ADS_SEARCHPREF_INFO SearchPref;
SearchPref.dwSearchPref = ADS_SEARCHPREF_CHASE_REFERRALS;
SearchPref.vValue.dwType = ADSTYPE_INTEGER;
SearchPref.vValue.Integer = ADS_CHASE_REFERRALS_ALWAYS;

For more information about referrals in Active Directory, see Referrals.

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)

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

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