开发者

Retrieving only 30 records from active directory per page and at the same time not loading all the data on the go

I have a web application and I have a feature of "Browse User Pictures". I have 1700 users. Now I am using Active Directory query to do that like:

DirectorySearcher ldapSe开发者_Go百科archer = new DirectorySearcher(lrootDSE, strRetrieve);
ldapSearcher.PageSize = 20;
ldapSearcher.SizeLimit = 1700;

But it loads all the information on the go and that slows my application. Can someone let me know a way where I can show user 30 entries per page and fetch only 30 records from Active Directory at a time.


One way is to use the "LDAP Control Extension for Simple Paged Results Manipulation", it is supported by MS Active Directory and allows you to specify how many results you need.

It is defined in RFC2696: http://www.ietf.org/rfc/rfc2696.txt, but is a lot more readable in the MSDN article: http://msdn.microsoft.com/en-us/library/aa366953%28v=VS.85%29.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜