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