ActiveDirectorySiteLink Constructors

Definition

Initializes a new instance of the ActiveDirectorySiteLink class.

Overloads

ActiveDirectorySiteLink(DirectoryContext, String)

Initializes a new instance of the ActiveDirectorySiteLink class using the specified DirectoryContext object and name.

ActiveDirectorySiteLink(DirectoryContext, String, ActiveDirectoryTransportType)

Initializes a new instance of the ActiveDirectorySiteLink class using the specified DirectoryContext object, name, and transport type.

ActiveDirectorySiteLink(DirectoryContext, String, ActiveDirectoryTransportType, ActiveDirectorySchedule)

Initializes a new instance of the ActiveDirectorySiteLink class using the specified DirectoryContext object, name, transport type, and replication schedule.

Source:
ActiveDirectorySiteLink.cs
Source:
ActiveDirectorySiteLink.cs
Source:
ActiveDirectorySiteLink.cs
Source:
ActiveDirectorySiteLink.cs
Source:
ActiveDirectorySiteLink.cs

Initializes a new instance of the ActiveDirectorySiteLink class using the specified DirectoryContext object and name.

C#
public ActiveDirectorySiteLink(System.DirectoryServices.ActiveDirectory.DirectoryContext context, string siteLinkName);

Parameters

context
DirectoryContext

An DirectoryContext object for creating this site link.

siteLinkName
String

The name for the site link.

Exceptions

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

The target server is either busy or unavailable.

This exception will occur for any of the following reasons.

  • The target in the context parameter is not a forest, configuration set, domain controller, or an AD LDS server.

  • siteLinkName is an empty string.

context or siteLinkName is null.

The credentials that were supplied are not valid.

Remarks

The default transport type is RPC.

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10
Source:
ActiveDirectorySiteLink.cs
Source:
ActiveDirectorySiteLink.cs
Source:
ActiveDirectorySiteLink.cs
Source:
ActiveDirectorySiteLink.cs
Source:
ActiveDirectorySiteLink.cs

Initializes a new instance of the ActiveDirectorySiteLink class using the specified DirectoryContext object, name, and transport type.

C#
public ActiveDirectorySiteLink(System.DirectoryServices.ActiveDirectory.DirectoryContext context, string siteLinkName, System.DirectoryServices.ActiveDirectory.ActiveDirectoryTransportType transport);

Parameters

context
DirectoryContext

A DirectoryContext object for creating this site link.

siteLinkName
String

The name for the site link.

transport
ActiveDirectoryTransportType

An ActiveDirectoryTransportType object that specifies the transport type.

Exceptions

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

The target server is either busy or unavailable.

This exception will occur for any of the following reasons.

  • The target in the context parameter is not a forest, configuration set, domain controller, or an AD LDS server.

  • siteLinkName is an empty string.

context parameter or siteLinkName is null.

The credentials that were supplied are not valid.

The transport type is not supported.

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10
Source:
ActiveDirectorySiteLink.cs
Source:
ActiveDirectorySiteLink.cs
Source:
ActiveDirectorySiteLink.cs
Source:
ActiveDirectorySiteLink.cs
Source:
ActiveDirectorySiteLink.cs

Initializes a new instance of the ActiveDirectorySiteLink class using the specified DirectoryContext object, name, transport type, and replication schedule.

C#
public ActiveDirectorySiteLink(System.DirectoryServices.ActiveDirectory.DirectoryContext context, string siteLinkName, System.DirectoryServices.ActiveDirectory.ActiveDirectoryTransportType transport, System.DirectoryServices.ActiveDirectory.ActiveDirectorySchedule? schedule);
C#
public ActiveDirectorySiteLink(System.DirectoryServices.ActiveDirectory.DirectoryContext context, string siteLinkName, System.DirectoryServices.ActiveDirectory.ActiveDirectoryTransportType transport, System.DirectoryServices.ActiveDirectory.ActiveDirectorySchedule schedule);

Parameters

context
DirectoryContext

A DirectoryContext object for creating this site link.

siteLinkName
String

The name for the site link.

transport
ActiveDirectoryTransportType

An ActiveDirectoryTransportType object that specifies the transport type.

schedule
ActiveDirectorySchedule

An ActiveDirectorySchedule object that specifies the replication schedule for this site link.

Exceptions

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

The target server is either busy or unavailable.

This exception will occur for any of the following reasons.

  • The target in the context parameter is not a forest, configuration set, domain controller, or an AD LDS server.

  • siteLinkName is an empty string.

context or the siteLinkName is null.

The credentials that were supplied are not valid.

The transport type is not supported.

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10