如何解决"服务器不支持控制。控制是非常关键和QUOT。 Active Directory中的错误不支持、如何解决、错误、关键

2023-09-08 13:16:26 作者:╃ノ╲, 男 λ╯

在试图让所有的用户从公元基于角色我得到异常:

When trying to get all users from AD based on a role I was getting the exception:

System.DirectoryServices.Protocols.DirectoryOperationException:本   超出大小限制

System.DirectoryServices.Protocols.DirectoryOperationException: The size limit was exceeded

通过这个线程的帮助: LdapConnection SearchRequest为超出大小限制我试图实现分页抛出异常。

With help of this thread : LdapConnection SearchRequest throws exception for "The size limit was exceeded I tried implementing paging.

现在我得到一个异常:

服务器不支持该控件。该控制是关键的。

The server does not support the control. The control is critical.

在如何去解决它的任何想法?我得到的基于角色的用户正常没有分页的小名单。 谢谢你。

Any ideas on how to go about resolving it? I get a smaller list of role based users fine without paging. Thanks.

更新: 我发现code,以检查是否寻呼是由AD这里支持的iPlanet LDAP和C#PageResultRequestControl ,然后我得到的结果分页支持。

UPDATE: I found code to check if paging is supported by AD here iPlanet LDAP and C# PageResultRequestControl and I got the result that paging is supported.

推荐答案

张贴在响应线程Paged LDAP搜索失败,请求属性不存在帮助我与我的问题了。我用AuthType.Basic并将其更改为AuthType.Ntlm有寻呼code运行良好。我怀疑这将影响其他任何一块公元code,我有,但我会检查和后,如果我发现什么需要注意的。

The solution posted in response to thread Paged LDap search fails with "The requested attribute does not exists" helped me with my issue too. I was using AuthType.Basic and changing it to AuthType.Ntlm had the paging code running fine. I doubt it will affect any other piece of AD code that I have but I'll check and post if I find anything to watch out for.

感谢。