ReplicationConnection Constructor (DirectoryContext, String, DirectoryServer, ActiveDirectorySchedule, ActiveDirectoryTransportType)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the ReplicationConnection class, using the specified context, name, source server, schedule, and transport type.

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

public ReplicationConnection(
	DirectoryContext context,
	string name,
	DirectoryServer sourceServer,
	ActiveDirectorySchedule schedule,
	ActiveDirectoryTransportType transport
)

Parameters

context
Type: System.DirectoryServices.ActiveDirectory.DirectoryContext

A DirectoryContext object that contains the target and credentials with which to establish a replication connection.

name
Type: System.String

The user-defined name of the connection.

sourceServer
Type: System.DirectoryServices.ActiveDirectory.DirectoryServer

A DirectoryServer object that identifies the source server of the connection.

schedule
Type: System.DirectoryServices.ActiveDirectory.ActiveDirectorySchedule

A ActiveDirectorySchedule object that specifies when the source is available for replication.

transport
Type: System.DirectoryServices.ActiveDirectory.ActiveDirectoryTransportType

One of the ActiveDirectoryTransportType members that specifies the transport type of the connection.

Exception Condition
ActiveDirectoryOperationException

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

ActiveDirectoryServerDownException

The target server is either busy or unavailable.

ArgumentException

This exception will occur for any one of the following reasons:

  • The target of the context parameter is not a domain controller or AD LDS instance.

  • sourceServer is invalid or an empty string.

  • The target specified in the context parameter does not match the server type specified in the sourceServer parameter. The servers must both be either domain controllers or AD LDS instances.

  • The servers specified in the context and sourceServer parameters are domain controllers, but are not in the same forest.

  • The servers specified in the context and sourceServer parameters are AD LDS instances, but do not belong to the same configuration set.

ArgumentNullException

context, sourceServer or schedule is null.

AuthenticationException

The credentials that were supplied are not valid.

InvalidEnumArgumentException

transport is not valid.

NotSupportedException

context is an AD LDS instance and transport is Smtp, which is not supported.

.NET Framework
Available since 2.0
Return to top
Show: