How can C# override LDAP server limit, but not Java
<p>I'm rewriting my C# program to Java and became very curios about the <strong>fact</strong> that C# application can extract tens of thousands of users with this trick:</p>

<pre><code>DirectorySearcher search = new DirectorySearcher(entry);
search.SizeLimit = 99000;
search.PageSize = 98000;
</code></pre>

<p>but my Java programs firmly say</p>

<p><strong>LDAPSearchException(resultCode=4 (size limit exceeded), numEntries=1000, numReferences=0, errorMessage='size limit exceeded')</strong></p>

<p>I tried both unboundid and standard libraries. Found million discussions about this problem and everywhere is said - the limitation is on server, you can do nothing.</p>

<p>But my C# application does work! How can this happen? Secret techniques from Microsoft, that cannot be repeated by other vendors?</p>

<p>Just in case, my code is:</p>

<pre><code>SearchRequest searchRequest = new SearchRequest(path, SearchScope.SUB, filter, "SamAccountName");
searchRequest.setSizeLimit(99000);
searchRequest.setTimeLimitSeconds(999);

SearchResult result = connection.search(searchRequest);

for (SearchResultEntry sre : result.getSearchEntries()) {
System.out.println(count++ + ": " + sre.toString());
}
</code></pre>

<p>for unboundid </p>

<p>p.s. I do not want to use workaround with searching for a*, b*, c* 
et c. Especially, considering that usernames might be not only in English.</p>