Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

LDAP Referral Technology Sample

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

This sample demonstrates sending a request that will generate a referral. This sample is available only in Visual C#.

For information about using the samples, see the following topics:

To build the sample

  1. Open a Command Prompt window and navigate to the LDAPReferral\CS directory.

  2. Type msbuild referral.sln at the command line.

To run the sample

  1. Navigate to the directory that contains the built executable file, using the command prompt.

  2. Type referral followed by its arguments and press Enter.

This sample has the following syntax:

referral <ldapServer> <user> <pwd> <domain>


The server.


Your user name.


Your password.


The Active Directory domain.

Here is an example:

referral myDC1.testDom.fabrikam.com  user1  secret@~1 testDom


This sample is a console application. You must start and run it in a Command Prompt window to view its output.

This sample defines the following methods.




Connects to the server using a LdapConnection.


Sends a request that generates a referral and then lists all the referral URLs.

© 2015 Microsoft