The class identifies a specific directory and the credentials that are used to access the directory.
Assembly: System.DirectoryServices (in System.DirectoryServices.dll)
A directory context must be created before accessing the methods and properties of a System.DirectoryServices.ActiveDirectory directory object such as a domain or forest.
When creating a directory context, the process' current credentials or alternate credentials can be applied to that context by using the appropriate constructor. These credentials determine the permissions that are in effect when the program accesses directory objects. Because Active Directory Domain Services objects might be protected against retrieval or modification by non-administrative users, the use of alternate credentials with permission to access the target objects is sometimes necessary for proper program functionality.
The following table contains a list of the target types that are allowed and a description of the format of the target string.
Target name format
The DNS name of the domain controller.
AD LDS Instance
The DNS name of the AD LDS server and the LDAP port number, for example, ad_lds_instance.fabrikam.com:389.
The DNS name of the domain, for example, sales.corp.fabrikam.com.
The DNS name of the forest, for example, corp.fabrikam.com.
The DNS name of the application partition.
AD LDS Configuration Set
One of the keywords that is associated with the service connection point registered by AD LDS instances for the configuration set.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.