ApplicationPartition.GetApplicationPartition Method

Returns an ApplicationPartition object for a specified directory context.

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

public static ApplicationPartition GetApplicationPartition(
	DirectoryContext context
)

Parameters

context
Type: System.DirectoryServices.ActiveDirectory.DirectoryContext

An DirectoryContext object that contains the target and credentials to use to retrieve the application partition object. The directory context must specify the DNS name of the application partition.

Return Value

Type: System.DirectoryServices.ActiveDirectory.ApplicationPartition
An ApplicationPartition object that represents the application partition for the specified directory context.

ExceptionCondition
ActiveDirectoryObjectNotFoundException

A target specified in context could not be found.

ActiveDirectoryOperationException

A call to the underlying directory service resulted in an error.

ArgumentNullException

context is null.

ArgumentException

context is not valid.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft