DirectorySearcher.ClientTimeout 属性
定义
获取或设置客户端等候服务器返回结果的最长时间。Gets or sets the maximum amount of time that the client waits for the server to return results. 如果服务器在此时间内不响应,则中止搜索,不返回任何结果。If the server does not respond within this time, the search is aborted and no results are returned.
public:
property TimeSpan ClientTimeout { TimeSpan get(); void set(TimeSpan value); };
public TimeSpan ClientTimeout { get; set; }
[System.DirectoryServices.DSDescription("DSClientTimeout")]
public TimeSpan ClientTimeout { get; set; }
member this.ClientTimeout : TimeSpan with get, set
[<System.DirectoryServices.DSDescription("DSClientTimeout")>]
member this.ClientTimeout : TimeSpan with get, set
Public Property ClientTimeout As TimeSpan
属性值
一个 TimeSpan 结构,包含客户端等待服务器返回结果的最长等待时间。A TimeSpan structure that contains the maximum amount of time for the client to wait for the server to return results.
默认值为 -1 秒,即表示无限期地等候。The default value is -1 second, which means to wait indefinitely.
- 属性
注解
此属性的最小分辨率为一秒。The minimum resolution of this property is one second. 秒的小数部分将被忽略。Fractions of seconds are ignored.
如果在 ServerTimeLimit 客户端超时之前达到,则服务器将返回其结果,并且客户端将停止等待。If the ServerTimeLimit is reached before the client times out, the server returns its results and the client stops waiting. 最大服务器时间限制为120秒。The maximum server time limit is 120 seconds.