简体   繁体   中英

Querying users incrementally from Active Directory from C#

I'm trying to load users incrementally from Active Directory which has a lot of users. (My memory can't hold all the data.)

I tried to use the DirectorySearcher.VirtualListView property to retrieve a portion of users each time, but it seems like the Server is not able to sort such a big amount of data. And it's giving me an error message:

The server does not support the requested critical extension

Is there a way to solve this problem?

By default, DirectorySearcher is limited to 1,000 items, and if you need to return more, read Can I get more than 1000 records from a DirectorySearcher in ASP.NET? .

AD/LDAP should not be used to sort, search, etc. for large data to avoid affecting the performance of the server. Consider to use a database where you could load all objects/users from AD and where you could then query the data from.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM