LDAP Paged Search Technology Sample
This sample demonstrates performing a paged search of the Active Directory using LDAP controls. A paged search enables results to be received in pages. This sample is available only in Visual C#.
For information about using the samples, see the following topics:
To build the sample
Open a Command Prompt window and navigate to the PagedSearch\CS directory.
Type msbuild pagedsearch.sln at the command line.
To run the sample
Navigate to the directory that contains the built executable file, using the command prompt.
Type pagedsearch followed by its arguments and press Enter.
This sample has the following syntax:
pagedsearch <ldapServer> <user> <pwd> <domain> <targetOU>
- ldapServer
The LDAP server.
- user
Your user name.
- pwd
Your password.
- domain
The Active Directory domain.
- targetOU
The target organizational unit (OU).
Here is an example:
PagedSearch myDC1.testDom.fabrikam.com user1 secret@~1 testDom OU=samples,DC=testDom,DC=fabrikam,DC=com
Note |
---|
This sample is a console application. You must start and run it in a Command Prompt window to view its output. |
Remarks
This sample defines the following methods.
Method | Description |
---|---|
|
Connects to the server using a LdapConnection. |
|
Adds a number of objects to the directory to be used in searching. |
|
Performs a paged search with a specified scope and attributes to return. |
|
Deletes the objects created for searching. |