4
我想在iPlanet LDAP上进行分页搜索。这里是我的代码:“服务器不支持该控制的控制是关键”iPlanet LDAP和C#PageResultRequestControl
LdapConnection ldap = new LdapConnection("foo.bar.com:389");
ldap.AuthType = AuthType.Anonymous;
ldap.SessionOptions.ProtocolVersion = 3;
PageResultRequestControl prc = new PageResultRequestControl(1000);
string[] param = new string[] { "givenName" };
SearchRequest req = new SearchRequest("ou=people,dc=bar,dc=com", "(ou=MyDivision)", SearchScope.Subtree, param);
req.Controls.Add(prc);
while (true)
{
SearchResponse sr = (SearchResponse)ldap.SendRequest(req);
... snip ...
}
当我运行它,我得到的是美国例外的剪断前行。快速谷歌搜索什么都没有。 iPlanet是否支持分页?如果是这样,我做错了什么?谢谢。
你说得对,这台服务器不支持分页。我会找出我们正在运行的版本以及是否有升级计划。谢谢! – ristonj 2009-11-06 20:18:19
+1:好的,很好的答案。 – Doug 2010-08-24 17:21:37