I am trying to do a paged search on an iPlanet LDAP. Here's my code:
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 ...
}
When I run this, I get an exception that states "The server does not support the control. The control is critical" on the line before the snip. Quick Google search turns up nothing. Does iPlanet support paging? If so, what am I doing wrong? Thanks.