Searching with the DirectorySearcher

In this chapter, we introduce LDAP searches with the DirectorySearcher class. We start with an overview of searching in general and provide a tour through the properties and methods of DirectorySearcher and its supporting classes. After that, we start to dig into the mechanics of searching with an explanation of the search base, scope, and security contexts.

Next, we take a deep look at building LDAP query filters, as they are the mechanism by which we can restrict the results of our searches and find specific objects. They are essential to effective searching.

After that, we look at how to control the results returned from a search. We demonstrate the methods available for executing a search, and we show how to enumerate the results we receive.

We wrap up with a discussion on performing large searches using a technique called paging, and we talk about how to have the server sort our results.

Категории