Ldap is a client-server structure, Use Ldap to connect ADand search object may raise a client timeout error.
Cause:
1. There is a lot of objects matched the filter.
2. The network condition between ldap client andserver may has high latency.(poor network environment)
Solution:
1. Increase the timeout parameter value ofSendRequest(request, timeout). PS:
TimeSpanconnectionTimeOut=newTimeSpan(0, 0, 60);
varresponse=ldapConnection.SendRequest(request, connectionTimeOut) asSearchResponse;
2. If you call the overwrite SendRequest(DirectoryRequestrequest); the timeout will be defaut 30 seconds.
3. You can also change the pageSize of DirectoryRequest.