DirectorySearcher.ServerTimeLimit Property

Definition

The ServerTimeLimit property gets or sets a value indicating the maximum amount of time the server spends searching. If the time limit is reached, only entries that are found up to that point are returned.

public TimeSpan ServerTimeLimit { get; set; }
[System.DirectoryServices.DSDescription("DSServerTimeLimit")]
public TimeSpan ServerTimeLimit { get; set; }

Property Value

A TimeSpan that represents the amount of time that the server should search.

The default value is -1 seconds, which means to use the server-determined default of 120 seconds.

Attributes

Remarks

The minimum resolution of this property is one second. Fractions of seconds are ignored.

Unlike the ServerPageTimeLimit property, the ServerTimeLimit property indicates the total amount of time that the server will spend on a search. When the time limit is reached, the server stops searching and returns the results that have accumulated up to that point.

Set ServerTimeLimit to -1 second to use the server-determined default.

Nota

If you set ServerTimeLimit to a value that is larger than the server-determined default of 120 seconds, the server-determined default is used. After the server time limit is reached, you cannot continue a search from where it left off.

Applies to

Produk Versi
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 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 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also