Searching a Directory

So far, we have touched on how to bind to objects inside a directory without worrying about how to find a specific object in the first place. In this section, we review the namespace support for querying directories for objects and dealing with the results.

It should be noted that the classes in this section—and, indeed, the entire concept of querying against an Active Directory—is really only directly supported by the LDAP provider.

Specifying What to Search For

The DirectorySearch class provides the actual mechanisms for searching an Active Directory. The first questions to be answered are: What are we searching for? and How do you communicate this to the directory using the DirectorySearch class? The answers to both lie ...

Get Visual Basic® Programmer's Guide to the .NET Framework Class Library now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.