AdamInstance.GetAdamInstance Method (DirectoryContext)

 

Returns an AD LDS instance for a specified context.

Namespace:   System.DirectoryServices.ActiveDirectory
Assembly:  System.DirectoryServices (in System.DirectoryServices.dll)

public static AdamInstance GetAdamInstance(
	DirectoryContext context
)

Parameters

context
Type: System.DirectoryServices.ActiveDirectory.DirectoryContext

A DirectoryContext object that contains the target and credentials to use to retrieve the object. The target of the context must be an AD LDS instance.

Return Value

Type: System.DirectoryServices.ActiveDirectory.AdamInstance

An AdamInstance object that refers to the AD LDS instance that is found.

Exception Condition
ActiveDirectoryObjectNotFoundException

A connection to the target that was specified in the context parameter could not be made.

ArgumentNullException

The context parameter is null.

ArgumentException

The context parameter is not valid.

System_CAPS_noteNote

The GetAdamInstance method refers to Active Directory Application Mode (ADAM) which has been renamed to Active Directory Lightweight Directory Services (AD LDS).

.NET Framework
Available since 2.0
Return to top
Show: