System. DirectoryServices Namespace

Source: Internet
Author: User

TheSystem. DirectoryServicesNamespace provides easy access to Active Directory from managed code. the namespace contains two component classes, DirectoryEntry and DirectorySearcher, which use the Active Directory Services Interfaces (ADSI) technology. ADSI is the set of interfaces that Microsoft provides as a flexible tool for working with a variety of network providers. ADSI gives the administrator the ability to locate and manage resources on a network with relative memory, regardless of the network's size.

The classes in this namespace can be used with any of the Active Directory service providers. the current providers are: Internet Information Services (IIS), Lightweight Directory Access Protocol (LDAP), Novell NetWare Directory Service (NDS), and WinNT.

ADSI is a programmatic interface for Microsoft Active Directory that enables your applications to interact with diverse directories on a network, using a single interface. using ADSI, you can create applications that can perform common tasks, such as backing up databases, accessing printers, and administering user accounts.

It is assumed that you have a general understanding of Active Directory before using these classes. for more information on Active Directory, see Introduction to Active Directory Objects, Active Directory Technology Backgrounder, and the Active Directory topics in the MSDN library (msdn.microsoft.com ):

  • Active Directory Programmers Guide
  • Active Directory Service Interfaces
  • Lightweight Directory Access Protocol API
  • ADSI System Providers
  • WinNT Binding String
  • Binding
  • IADsOpenDSObject: OpenDSObject

Active Directory is a tree structure. each node in the tree contains a set of properties. use this namespace to traverse, search, and modify the tree, and read and write to the properties of a node.

TheDirectoryEntryClass encapsulates a node or object in the Active Directory hierarchy. Use this class for binding to objects, reading properties, and updating attributes. Together with helper classes,DirectoryEntryProvides support for life-cycle management and navigation methods, including creating, deleting, renaming, moving a child node, and enumerating children.

UseDirectorySearcherClass to perform queries against the Active Directory hierarchy. LDAP is the only system-supplied Active Directory Service Interfaces (ADSI) provider that supports searching.

A search of the Active Directory hierarchy throughDirectorySearcherReturns instances of SearchResult, which are contained in an instance of the SearchResultCollection class.

Namespace hierarchy

Classes
Class Description
DirectoryEntries Contains the children (child entries) of an entry in Active Directory.
DirectoryEntry Encapsulates a node or object in the Active Directory hierarchy.
DirectorySearcher Performs queries against Active Directory.
DirectoryServicesPermission Allows control of code access security permissions for System. DirectoryServices.
DirectoryServicesPermissionAttribute Allows declarative System. DirectoryServices permission checks.
DirectoryServicesPermissionEntry Defines the smallest unit of a code access security permission set for System. DirectoryServices.
DirectoryServicesPermissionEntryCollection Contains a stronugly typed collection of DirectoryServicesPermissionEntry objects.
PropertyCollection Contains the properties of a DirectoryEntry.
PropertyValueCollection Contains the values of a DirectoryEntry property.
ResultPropertyCollection Contains the properties of a SearchResult instance.
ResultPropertyValueCollection Contains the values of a SearchResult property.
SchemaNameCollection Contains a list of the schema names that the SchemaFilter property of a DirectoryEntries object can use.
SearchResult Encapsulates a node in the Active Directory hierarchy that is returned during a search through DirectorySearcher.
SearchResultCollection Contains the SearchResult instances that the Active Directory hierarchy returned during a DirectorySearcher query.
SortOption Specifies how to sort the results of a search.
Enumerations
Enumeration Description
AuthenticationTypes Specifies the types of authentication used in System. DirectoryServices.
DirectoryServicesPermissionAccess Defines access levels used by System. DirectoryServices permission classes.
ReferralChasingOption Specifies if and how referral chasing is pursued.
SearchScope Specifies the possible scopes for a directory search.
SortDirection Specifies how to sort the results of an Active Directory query.

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.