Platform SDK: Active Directory, ADSI, and Directory Services |
Optionally, you may enable the option to chase referrals. Referrals happen when the server you are querying does not contain that information, but knows where to find it. The target server returns the result set, which may include both the actual data and a referral to another server to retrieve the additional data. By enabling chase referrals, the underlying ADSI client code will use that referral information to retrieve the target object from the server described in the referral information. Be aware that the disabling of chase referrals may result in a smaller result set, whereas enabling chase referrals may cause a query to span many servers. The best solution to alleviate this overhead is to use the global catalog whenever possible.
For example, when a client asks Server A (A) to query a user object (U), A can suggest that the client continue the search on Server B (B) if U does not reside on A, but is known to be on B. The client has the choice of pursuing the referral or not. Search referrals free the client from requiring advanced knowledge of the capability of each server. However, the client must specify the type of referrals a server should make.
Active Directory offers search referral services. A client can choose any of the following four types of referral chasing:
For example, Server A contains objects in DC=Sales, DC=Microsoft, DC=Com. Server B contains objects in DC=Seattle, DC=Sales, DC=Microsoft, DC=Com. Notice that the name of Server B forms a contiguous path from Server A. When a client contacts Server A, requests a subtree search on DC=Sales, DC=Microsoft, DC=Com, and specifies the referral to be a subordinate type, the following event occurs:
Server A returns all objects that it knows within its scope.
Server A informs the client that objects in DC=Seattle, DC=Sales, DC=Microsoft, DC=COM can be found on Server B.
The client can choose to contact Server B. If so, the following event occurs:
Server B responds with the requested objects.
If Server B detects other servers on the contiguous naming path and the process continues.
Always. The server generates referrals if the search can be resolved based on either the external type or the subordinate type.
Note In Active Directory, the global catalog contains all objects in a given enterprise. Searching a global catalog server yields better performance than pursuing referrals from one server to another.