Re: AD Search: More data is available, or time limit was exceeded
- From: "Joe Kaplan" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 17 Jan 2008 16:28:33 -0600
What if you try setting the ServerPageTimeLimit property on the
DirectorySearcher to a value less that the server's max query time (which is
usually two minutes but might be different on your DC; you can look it up)?
That time limit is supposed to define how long a particular page in a paged
search will execute before it gives up and returns partial results.
By using a small page size and a small page time limit, you'll make sure
search more chatty, but less likely to error out on the server.
I'd also suggest using objectCategory=computer as your filter criteria as
objectClass is not usually indexed in AD but objectCategory is. It might
improve your query perf.
Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Alexey Smirnov" <alexey.smirnov@xxxxxxxxx> wrote in message
news:05e9091c-9b43-4b1c-a47f-e24913f9f387@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jan 17, 5:23 pm, Alexey Smirnov <alexey.smir...@xxxxxxxxx> wrote:
I'm searching in AD for computers (objectClass=computer) in a few
domains. The search works just fine in "small" domains with less than
1,000 of computer entries, and failed on domain with more than 4,000
entries. I do receive only first 560 objects and either get a timeout,
or app is never stopped.
Well, it seems that the problem is somewhere on DC. I tried to connect
to another DC and I received more than 560 objects (about 2000) but
then the same error occured again. So, currently I decided to
enumerate all OUs and used "OU=...,DC=..." to search. This approach
returns duplicates but finally I'm able to get all computers within
the domain.
.
- Follow-Ups:
- Re: AD Search: More data is available, or time limit was exceeded
- From: Alexey Smirnov
- Re: AD Search: More data is available, or time limit was exceeded
- References:
- AD Search: More data is available, or time limit was exceeded
- From: Alexey Smirnov
- Re: AD Search: More data is available, or time limit was exceeded
- From: Alexey Smirnov
- AD Search: More data is available, or time limit was exceeded
- Prev by Date: Re: AD Search: More data is available, or time limit was exceeded
- Next by Date: Re: AD Search: More data is available, or time limit was exceeded
- Previous by thread: Re: AD Search: More data is available, or time limit was exceeded
- Next by thread: Re: AD Search: More data is available, or time limit was exceeded
- Index(es):