难道DirectorySearcher从目标上限为5000,即使页面大小设置为更大 [英] Is the directorysearcher object capped at 5000 even if pagesize is set to greater

查看:554
本文介绍了难道DirectorySearcher从目标上限为5000,即使页面大小设置为更大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

时的DirectorySearcher从的findall结果的方法限制在5000结果,即使页面大小设置为大。 这真的好像是,因为无论什么时候我得到完全5000的结果。 这是C#

Is the directorysearcher findall results method capped at 5000 results even if pagesize is set to greater. It really seems to be, because no matter what I get exactly 5000 results. This is C#

推荐答案

首先,这是它限制在一个单一的搜索返回的最大条目数服务器端的设置。默认为1'000。

First of all, it's a server-side setting which limits the maximum number of entries returned in a single search. Default is 1'000.

其次,如果你真的需要枚举超过1'000条目这个限制,你应该看看分页搜索。很简单,将 DirectorySearcher.PageSize 项的值(低于系统限制),例如: 500,你会得到你的结果的500个条目页面。

Secondly, if you really need to enumerate more than this limit of 1'000 entries, you should look into paged searches. Quite simply, set the DirectorySearcher.PageSize entry to a value (less than that system limit), e.g. 500, and you'll get your results in pages of 500 entries.

有多少项目,你会得到总没有限制 - 你可以简单地列举了 DirectorySearcher.FindAll()集合,你应该能够处理任意数量对条目的方式。广告服务器将只是简单的批量在500页的结果 - 一旦你列举了一个页面,下一个将交付

There's no limit on how many entries you'll get in total - you can simply enumerate the DirectorySearcher.FindAll() collection and you should be able to handle any number of entries that way. The AD server will just simply batch up your results in pages of 500 - once you've enumerated one page, the next one will be delivered.

马克·

这篇关于难道DirectorySearcher从目标上限为5000,即使页面大小设置为更大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆