ApplicationPartition Constructor (DirectoryContext, String, String)
Initializes a new instance of the ApplicationPartition class, using the specified distinguished name and object class.
Namespace: System.DirectoryServices.ActiveDirectory
Assembly: System.DirectoryServices (in System.DirectoryServices.dll)
public ApplicationPartition( DirectoryContext context, string distinguishedName, string objectClass )
Parameters
- context
- Type: System.DirectoryServices.ActiveDirectory.DirectoryContext
The DirectoryContext object that is used to create this application partition.
- distinguishedName
- Type: System.String
The String that specifies the distinguished name for this application partition.
- objectClass
- Type: System.String
The String that specifies the object class that represents this application partition.
| Exception | Condition |
|---|---|
| ActiveDirectoryOperationException | A call to the underlying directory service resulted in an error. |
| ActiveDirectoryServerDownException | The target server is either busy or unavailable. |
| ArgumentException | The target in the context parameter is not a server, or the distinguishedName parameter is not in a valid distinguished name format. This exception is also thrown if the application partition is being created within an Active Directory forest, rather than an AD LDS configuration set, because the objectClass can only be specified for AD LDS configuration sets. |
| ArgumentNullException | context or distinguishedName is null. |
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.