Windows Server has further developed the Active Directory (Active Directory) on the basis of Windows NT Server 4.0. The Active Directory is started from a data store. It uses a data store similar to the Exchange server, known as: Extensible Storage Service (ESS). It is characterized by no need to define the parameters of the database in advance, can achieve dynamic growth, performance is very good. Indexed on top of this data store, it can be easily and quickly searched and positioned. The Active Directory's partition is domain, and a domain can store millions of objects. There is also a hierarchical relationship between domains, which can be extended indefinitely by establishing domain trees and domain forests.
The active catalogue fully embodies the advantages of "ICE" of Microsoft products, i.e. integration (integration), depth (comprehensive), and usability (Ease of use). The Active Directory is a fully scalable, scalable directory service that meets the needs of both commercial ISPs and intranet and extranet.
In NET environment is very easy to manipulate the Active Directory, which provides a lot of packaged classes to manipulate the Active Directory, these classes are stored in the System.directoryservicess namespace. This article provides a brief overview of how to use these classes to read information in the Active Directory.
Note: We assume that you have a basic understanding of the concept of the Active Directory.
My network environment consists of two domain controllers, and several Win2000 workstations, installed the Active Directory to save all the information in the domain, the domain name is SZCS.
Let's start by building a simple console application to read the Active Directory information.
Step One: Build the project
(This is not much to say)
Step Two: Add references
Because the classes that manipulate the Active Directory are stored in the System.DirectoryServices.dll file. So, we have to add a reference to it in the project.
Methods: In the menu, select Item-Reference, select System.DirectoryServices.dll, OK.
Step Three: Reference namespaces
Method: Add the following program at the beginning of the program
Using System.DirectoryServices;