title: How to resolve "The server does not support the control. The control is critical." Active Directory error
body: <p>When trying to get all users from AD based on a role I was getting the exception: </p>
  
  <blockquote>
    <p>System.DirectoryServices.Protocols.DirectoryOperationException: The
    size limit was exceeded</p>
  </blockquote>
  
  <p>With help of this thread : 
  <a href="https://stackoverflow.com/questions/13567685/ldapconnection-searchrequest-throws-exception-for-the-size-limit-was-exceeded">LdapConnection SearchRequest throws exception for “The size limit was exceeded</a> I tried implementing paging.</p>
  
  <p>Now I am getting an exception:</p>
  
  <blockquote>
    <p>The server does not support the control. The control is critical.</p>
  </blockquote>
  
  <p>Any ideas on how to go about resolving it? I get a smaller list of role based users fine without paging.
  Thanks.</p>
  
  <p>UPDATE:
  I found code to check if paging is supported by AD here <a href="https://stackoverflow.com/questions/1646518/iplanet-ldap-and-c-sharp-pageresultrequestcontrol">iPlanet LDAP and C# PageResultRequestControl</a> and I got the result that paging is supported.</p>