Directory Programming .NET

Active Directory and ADAM programming support for .NET developers
Welcome to Directory Programming .NET Sign in | Join | Help
in Search

PageResultResponseControl

Last post 05-16-2008, 12:34 AM by dunnry. 2 replies.
Sort Posts: Previous Next
  •  05-15-2008, 12:33 PM 3567

    PageResultResponseControl

    I am currently trying to use the PageResultResponseControl to try and do paging to get back a full set of results, regardless of a server-side limit on the maximum results returned by a search.

    The server that I am trying it against is for Michigan State University, which is "ldap.msu.edu:389", base DN: dc=msu,dc=edu (if you would like to try).

    I am currently getting a DirectoryOperationException when I perform the search request, and the resultcode says that there is an unavailable criticle extension. I have seen other software (read: Softerra LDAP Browser) page the results and get back result sets of over 10,000, but I can't seem to get back anything over 500 using the PageResultResponseControl from the same server.

    Can't S.DS.P using the PageResultResponseControl reproduce the same behavior that the DirectorySearcher class has in S.DS?

    I am using the code sample from Ryan's blog at:
    http://dunnry.com/blog/PagingInSystemDirectoryServicesProtocols.aspx

    ... also, as a side question: What do the PageResultResponseControl.IsCritical and PageResultResponseControl.ServerSide mean?

    Thanks, jared
  •  05-15-2008, 2:21 PM 3569 in reply to 3567

    Re: PageResultResponseControl

    Out of curiosity, did you try a paged search using the same code against AD or ADAM?  I wonder if there is some sort of compatibility issue here.  If the DirectorySearcher works against the MSU db, then that means that the underlying LDAP API will work too and the issue is likely either something in the code or a weird bug in S.DS.P itself.

    I'm not an expert in controls, but my understand is that a control can be on the server or the client.  If the control is an instruction for the server (like it would be with a paging request), it needs to be a server control.  I'm not actually aware of any client side controls at all.  :)

    My understanding on criticality is that if the control is critical, the server must either honor it or fail the request.  If it is not, then the server has the option of not processing the control if there is an issue with it for some reason.

    For both of these, I think you'd get a more satifying answer by reading the LDAP spec instead.  :)

  •  05-16-2008, 12:34 AM 3576 in reply to 3567

    Re: PageResultResponseControl

    Check to see if the server support paging.  Some servers don't...

    The easiest way is to use ldp and File > Connect to 'ldap.msu.edu'.  It should give you a list of supported controls there and you can see if paging is one of them.

    Ryan Dunn
    Extemporaneous Mumblings
    The .NET Developer's Guide to Directory Services Programming
View as RSS news feed in XML