Technology Summary for System.DirectoryServices.Protocols
The System.DirectoryServices.Protocols namespace is a managed API for programming Lightweight Directory Access Protocol (LDAP). LDAP is a directory service protocol that runs on a layer above the TCP/IP stack and enables access to an existing directory.
The System.DirectoryServices.Protocols namespace also helps developers build Directory Services Markup Language (DSML) payloads without intimate knowledge of DSML Version 2.0 (V2) format or Simple Object Access Protocol (SOAP). DSML is essentially LDAP encoded as XML rather than BER/ASN.1.
In addition to this conceptual documentation, the Introduction to System.DirectoryServices.Protocols whitepaper on the MSDN Library explains concepts, practices, and guidelines for programming with the SDS.Protocols API.
Keywords
Lightweight Directory Access Protocol, LDAP, Basic Encoding Rules, BER, Abstract Syntax Notation One, ASN.1, Distinguished Names, LDAP Session, Session Options, Concurrent Binding, Extended Controls, Directory, Directory Service, Domain Controller, Directory Services Markup Language, DSML, Extensible Markup Language, XML, Simple Object Access Protocol, SOAP.
System.DirectoryServices.Protocols
Related Technologies
System.DirectoryServices, System.DirectoryServices.ActiveDirectory
Lightweight Directory Access Protocol (LDAP) - LDAP is a directory service protocol that runs on a layer above the TCP/IP stack. It provides a mechanism used to connect to, search, and modify Internet directories. For more information about LDAP, see About Lightweight Directory Access Protocol in the MSDN Library.
Directory Services Markup Language (DSML) Services for Windows - DSML Services for Windows (DSfW) is the Microsoft implementation of the DSML Version 2.0 (V2) standard established by the Organization for the Advancement of Structured Information Standards (OASIS). DSfW allows clients to send DSML request payloads over SOAP to DSfW. DSfW converts DSML requests to LDAP requests and the requests are sent to an LDAP directory such as Active Directory Domain Services. After the LDAP directory responds to the requests, DSfW converts the LDAP responses into DSML response payloads and return them to the clients, via SOAP. For more information about DSfW, see About DSML Services for Windows in the MSDN Library.
Background
The System.DirectoryServices.Protocols namespace is not a high-level abstraction API, as compared to System.DirectoryServices. However, the System.DirectoryServices.Protocols namespace provides an easy to use object model, provides application developers the greatest control and communicates LDAP standards via the native LDAP TCP/IP protocol or via the DSML protocol.
Operations defined in the LDAP v3 and DSML v2 can be accessed via the System.DirectoryServices.Protocols namespace.
In the System.DirectoryServices.Protocols namespace, the classes implementing operations (such as add, delete, and rename) are separate from the classes that implement transport (such as SOAP over HTTP vs. File vs. SMTP). These two sets of classes can be combined to perform any operation over any transport. In addition, this permits future transport protocols to be implemented without any operation class modifications.
An application would use LDAP specific classes, like LdapDirectoryIdentifier, LdapConnection and LdapSessionOptions, when identifying and connecting to an LDAP server.
An application would use the DSML specific classes, like DsmlDirectoryIdentifier and DsmlSoapHttpConnection, when identifying and connecting to a DSML server. The DsmlRequestDocument and DsmlResponseDocument classes would be used to construct or manipulate the DSML request and response documents.
An application would use the common System.DirectoryServices.Protocols classes, like AddRequest, AddResponse, SearchRequest and SearchResponse, when making directory requests and reviewing directory responses, using either LDAP or DSML.
The following tables list the main classes that must be implemented for each specified task area. This is not a comprehensive list of all the classes in each namespace, but it includes all classes demonstrated in the How-to topics.
Common task areas
LDAP-specific task areas
Technology Area | Classes/interfaces/configuration elements |
---|---|
LDAP Directory Identification and Connection |
LdapDirectoryIdentifier, LdapConnection |
Get and set LDAP Session Options |
LdapSessionOptions |
Partial Results from a incomplete asynchronous operation |
|
LDAP Exceptions |
LdapException, TlsOperationException, BerConversionException |
DSML-specific task areas
Technology Area | Classes/interfaces/configuration elements |
---|---|
Construct or Manipulate a DSML document |
DsmlDocument, DsmlRequestDocument, DsmlResponseDocument |
DSML Authorization Request |
|
DSML Responses |
|
DSML Directory Identification and Connections |
DsmlDirectoryIdentifier, DsmlSoapConnection, DsmlSoapHttpConnection |
DSML Exceptions |
See Also
Concepts
System.DirectoryServices.Protocols Namespace Overview
Other Resources
Directory Services Samples
About DSML Services for Windows
Introduction to System.DirectoryServices.Protocols
Send comments about this topic to Microsoft.
Copyright © 2008 by Microsoft Corporation. All rights reserved.