当我尝试根据角色从 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.
谢谢.
这篇关于如何解决“服务器不支持控件.控制至关重要."活动目录错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!