MSDN Library

System.DirectoryServices.Protocols Architecture

The System.DirectoryServices.Protocols namespace has three top level classes:

The DirectoryConnection class provides a way to transport either the DsmlDocument or the DirectoryOperation object. The DsmlDocument class is used to send batched DirectoryOperation requests. The DirectoryOperation class contains single operation requests.

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.

Architecture Elements

The following sections identify the architecture of the top level System.DirectoryServices.Protocols classes.


The DirectoryConnection class is the base class for DSML bindings and LDAP TCP/IP or UDP connections. All classes derived from the DirectoryConnection class support taking a single DirectoryRequest object and returning the resulting DirectoryResponse object. Derived classes specific to DSML also support taking a DsmlRequestDocument object and returning the resulting DsmlResponseDocument object, in order to support the DSML batching capability.

The System.DirectoryServices.Protocols namespace supports SOAP protocol over HTTP (DsmlSoapHttpConnection) and LDAP over TCP/IP and UDP (LdapConnection).

Directory connection objects


There are two types of DsmlDocument objects:

  • DsmlRequestDocument
  • DsmlResponseDocument
DSML document objects

The DsmlRequestDocument class is used to build a DSML request payload, using classes such as AddRequest, ModifyRequest, and SearchRequest.

The DsmlResponseDocument class contains the corresponding response elements, using classes such as AddResponse, ModifyResponse, and SearchResponse.


There are two types of DirectoryOperation objects:

  • DirectoryRequest
  • DirectoryResponse
Directory operation objects

The DirectoryRequest class is the base class for request related classes, like the AddRequest, DeleteRequest, ModifyRequest, and SearchRequest classes.

The DirectoryResponse class is the base class for request response classes, like the AddResponse, DeleteResponse, ModifyResponse and SearchResponse classes.

See Also

Send comments about this topic to Microsoft.

Copyright © 2008 by Microsoft Corporation. All rights reserved.

Community Additions

© 2016 Microsoft