2.3 LDAP Libraries for C# Namespaces

The LDAP libraries for C# developer kit is released under the Novell.Directory.Ldap namespace and all the class files under this namespace are further divided into the six different namespaces:

2.3.1 Novell.Directory.Ldap

Allows you to manage entries and schema definitions on LDAPv3 compliant servers. It provides classes for the core C# LDAP library, which is most frequently used by applications. These classes are based on Internet drafts maintained by IETF.

NOTE:The schema functionality is yet to be implemented in the .NET C# Library.

2.3.2 Novell.Directory.Ldap.Asn1

Allows you to encode and decode Abstract Syntax Notation One (ASN.1) object types using Basic Encoding Rules (BER).

ASN.1 is the language used by the OSI protocols for describing abstract syntax. ASN.1 is defined in ISO documents 8824.2 and 8825.2.

BER is historically the original encoding rules for ASN.1.

The LDAP protocol uses the BER encoding format and Novell.Directory.Ldap.Asn1 includes classes that allow ASN.1 to be encoded and decoded into the BER format. However, the classes have been built to be flexible enough to allow an application to provide its own ASN.1 encoder class. This class could encode data into any encoding format. For example, a particular application might want to use Packed Encoding Rules (PER) to encode the supported ASN.1 objects. This application would have to supply its own PER encoder and PER decoder classes. These application-provided classes will need to implement the ASN1Encoder and ASN1Decoder interfaces defined in this package.

NOTE:LDAP uses BER encoding and the Novell provided namespace already includes a BEREncoder and BERDEcoder class. These classes can be used by third party developers who wish to develop new LDAP controls or extensions. These classes could also be used by an arbitrary .NET C# application that wishes to encode and decode data as defined in the ASN.1 format.

2.3.3 Novell.Directory.Ldap.Controls

Provides classes for using LDAP controls. This namespace uses LDAP controls that are supported in LDAPv3. The use of these controls requires an LDAP server that supports them.

2.3.4 Novell.Directory.Ldap.Extensions

Provides classes for using the Novell LDAP extensions that manage replicas, naming contexts, and the synchronization of replicas and the schema. This namespace uses LDAP extensions that are supported in LDAPv3. These extensions require the LDAP server to run on eDirectory.

2.3.5 Novell.Directory.Ldap.Rfc2251

Provides classes that represent protocol elements as defined by the IETF LDAP RFC 2251. This namespace is designed to work on LDAPv3 servers. It does not support the T.61 character set used by the LDAPv2 protocol.

2.3.6 Novell.Directory.Ldap.Utilclass

Provides utility classes for use by LDAP applications. This namespace includes the DN class and RDN class supporting DN and RDN encapsulation respectively. It also provides classes perform client functions related to the LDAP protocol. This package is designed to work on LDAPv3 servers. It does not support the T.61 character set used by the LDAPv2 protocol.

The central LDAP class is LdapConnection. It provides methods to establish an authenticated or anonymous connection to an LDAP server, as well as methods to search for, modify, compare, and delete entries in the directory.

The LdapConnection class also provides fields for storing settings that are specific to the LDAP session (such as, limits on the number of results returned or timeout limits). An LdapConnection object can be cloned, allowing objects to share a single network connection but use different settings (using LdapConstraints or LdapSearchConstraints).

A synchronous search conducted by an LdapConnection object returns results in an LdapSearchResults object, which can be enumerated to access the entries found. Each entry (represented by an LdapEntry object) provides access to the attributes (represented by LdapAttribute objects) returned for that entry. Each attribute can produce the values found as byte arrays or as Strings.