DirectorySearcher.ServerTimeLimit Property

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.

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

[DSDescriptionAttribute("DSServerTimeLimit")]
public TimeSpan ServerTimeLimit { get; set; }

Property Value

Type: System.TimeSpan
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.

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.

NoteNote

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.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft