DirectorySearcher Pagination

  • Thread starter Thread starter Jason S
  • Start date Start date
J

Jason S

Group,

I'm hoping someone can shed some light on active directory search pagination
for me. For the DirectorySearcher class there are several methods for
paging (.PageSize, .ServerPageTimeLimit) but there are no examples or
explanation. How do I implement pagination with these properties? I can't
seem to locate any pointers on this.

The closest I came was this fine article by Duncan Mackenzie
http://www.msdnaa.net/Resources/display.aspx?ResID=2338

As far as I can tell this "paging" is not what I would normally refer to as
paging... that is to say it does not appear to be a mechanism by which I can
specify that I want 20 records at a time, now please give me page n. It
looks rather like you are specifying the chunk size you want your results
in?

Or I have my head up the wrong place altogether... someone please help.

Regards,
Jason S.
 
I'm hoping someone can shed some light on active directory search pagination
for me. For the DirectorySearcher class there are several methods for
paging (.PageSize, .ServerPageTimeLimit) but there are no examples or
explanation. How do I implement pagination with these properties?

What exactly are you trying to accomplish? You want to retrieve the
first 100 elements, and then call again and retrieve elements no. 101
through 200?

Well, you can't do that with DirectorySearcher - the properties for
PageSize etc. are only meant as a workaround to be able to retrieve
large numbers of DirectoryEntries - the AD internally will send you
pages of results and then keep on searching until it's done. But you
on the "receiving" end basically end up getting a full result set.

Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
What exactly are you trying to accomplish? You want to retrieve the
first 100 elements, and then call again and retrieve elements no. 101
through 200?
Exactly

Well, you can't do that with DirectorySearcher - the properties for
PageSize etc. are only meant as a workaround to be able to retrieve
large numbers of DirectoryEntries - the AD internally will send you
pages of results and then keep on searching until it's done. But you
on the "receiving" end basically end up getting a full result set.

Oh, well that's a bummer. But thanks for your insight. The docs were a tad
fuzzy here.

Regards,
Jason
 
Back
Top