Manipulating the Active Directory with C # in the. NET Environment

Source: Internet
Author: User

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;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.