如何解决“服务器不支持控件.控制至关重要."活动目录错误

How to resolve quot;The server does not support the control. The control is critical.quot; Active Directory error(如何解决“服务器不支持控件.控制至关重要.活动目录错误)
本文介绍了如何解决“服务器不支持控件.控制至关重要."活动目录错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

当我尝试根据角色从 AD 获取所有用户时出现异常:

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.

更新:我在这里找到了检查 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.

推荐答案

针对帖子发布的解决方案 分页 LDap 搜索因请求的属性不存在"而失败 也帮助我解决了我的问题.我正在使用 AuthType.Basic 并将其更改为 AuthType.Ntlm 使分页代码运行良好.我怀疑它会影响我拥有的任何其他 AD 代码,但如果我发现任何需要注意的地方,我会检查并发布.

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.

谢谢.

这篇关于如何解决“服务器不支持控件.控制至关重要."活动目录错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to determine the type (AD User vs. AD Group) of an account?(如何确定帐户的类型(AD 用户与 AD 组)?)
How to authenticate users with a customer#39;s (remote) active directory server(如何使用客户的(远程)活动目录服务器对用户进行身份验证)
How to know if my DirectoryEntry is really connected to my LDAP directory?(如何知道我的 DirectoryEntry 是否真的连接到我的 LDAP 目录?)
Add member to AD group from a trusted domain(将成员从受信任的域添加到 AD 组)
How to retrieve Users in a Group, including primary group users(如何检索组中的用户,包括主要组用户)
Active Directory: DirectoryEntry member list lt;gt; GroupPrincipal.GetMembers()(Active Directory:DirectoryEntry 成员列表 lt;gt;GroupPrincipal.GetMembers())