ApplicationPartition.FindDirectoryServer Method (String, Boolean)

 
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.

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

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

public DirectoryServer FindDirectoryServer(
	string siteName,
	bool forceRediscovery
)

Parameters

siteName
Type: System.String

A String that specifies a site name.

forceRediscovery
Type: System.Boolean

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

Return Value

Type: System.DirectoryServices.ActiveDirectory.DirectoryServer

A DirectoryServer object for this application partition and specified site.

Exception Condition
ArgumentException

siteName is an empty string.

ArgumentNullException

siteName is null.

InvalidOperationException

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

ObjectDisposedException

The object has been disposed.

.NET Framework
Available since 2.0
Return to top
Show: