Same paging code works against a test domain controller, but doesn't work against another different AD domain that has same similar setup (Windows 2012 r2 based). DisableVLVSupport=0 on both domains.
LdapException: (12) Unavailable Critical Extension
LdapException: Server Message: 000020EF: SvcErr: DSID-03140552, problem 5010 (UNAVAIL_EXTENSION), data 0
Error code: 53
I was able to reproduce the issue on the working domain by setting
MaxTempTableSizeto a value smaller than the total count of users in cn=Users dn. It turns out thatMaxTempTableSizeshould be bigger than the total count of the paged result. One of the main differences between the two Active Directory domains was mainly that the second one had a huge number of users.Used
Ntdsutil.exetool to set the LDAP Policy property value.