ApplicationPartition.FindDirectoryServer Method

Definition

Retrieves a directory server for this application partition.

Overloads

FindDirectoryServer()

Returns a DirectoryServer object for this application partition and current site.

FindDirectoryServer(Boolean)

Returns a DirectoryServer object for the application partition and current site with an option to ignore cached information.

FindDirectoryServer(String)

Returns a DirectoryServer object for the application partition and a specified site.

FindDirectoryServer(String, Boolean)

Returns a DirectoryServer object for this application partition for a specified site, with an option to ignore cached information.

FindDirectoryServer()

Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs

Returns a DirectoryServer object for this application partition and current site.

C#
public System.DirectoryServices.ActiveDirectory.DirectoryServer FindDirectoryServer();

Returns

A DirectoryServer object for this application partition and site.

Exceptions

The ApplicationPartition object has not yet been committed to the underlying directory store.

The object has been disposed.

See also

Applies to

.NET 10 (package-provided) a ďalšie verzie
Produkt Verzie
.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

FindDirectoryServer(Boolean)

Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs

Returns a DirectoryServer object for the application partition and current site with an option to ignore cached information.

C#
public System.DirectoryServices.ActiveDirectory.DirectoryServer FindDirectoryServer(bool forceRediscovery);

Parameters

forceRediscovery
Boolean

A Boolean value that indicates whether cached information should be ignored. true if cached information should be ignored; otherwise, false.

Returns

A DirectoryServer object for this application partition and site.

Exceptions

The ApplicationPartition object has not yet been committed to the underlying directory store.

The object has been disposed.

See also

Applies to

.NET 10 (package-provided) a ďalšie verzie
Produkt Verzie
.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

FindDirectoryServer(String)

Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs

Returns a DirectoryServer object for the application partition and a specified site.

C#
public System.DirectoryServices.ActiveDirectory.DirectoryServer FindDirectoryServer(string siteName);

Parameters

siteName
String

A String that specifies a site name.

Returns

A DirectoryServer object for this application partition and specified site.

Exceptions

siteName is an empty string.

siteName is null.

The ApplicationPartition object has not yet been committed to the underlying directory store.

The object has been disposed.

See also

Applies to

.NET 10 (package-provided) a ďalšie verzie
Produkt Verzie
.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

FindDirectoryServer(String, Boolean)

Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs
Source:
ApplicationPartition.cs

Returns a DirectoryServer object for this application partition for a specified site, with an option to ignore cached information.

C#
public System.DirectoryServices.ActiveDirectory.DirectoryServer FindDirectoryServer(string siteName, bool forceRediscovery);

Parameters

siteName
String

A String that specifies a site name.

forceRediscovery
Boolean

A Boolean value that indicates whether cached information should be ignored. true if cached information should be ignored; otherwise, false.

Returns

A DirectoryServer object for this application partition and specified site.

Exceptions

siteName is an empty string.

siteName is null.

The ApplicationPartition object has not yet been committed to the underlying directory store.

The object has been disposed.

See also

Applies to

.NET 10 (package-provided) a ďalšie verzie
Produkt Verzie
.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