如何解决“服务器不支持控件.控制至关重要."活动目录错误
- 作者: 你猜___
- 来源: 51数据库
- 2022-10-21
问题描述
当我尝试根据角色从 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.
谢谢.
- C#通过fleck实现wss协议的WebSocket多人Web实时聊天(附源码)
- 团队城市未满足要求:MSBuildTools12.0_x86_Path 存在
- 使用 MSBuild.exe 在发布模式下构建 C# 解决方案
- 当我发布 Web 应用程序时,AfterPublish 脚本不运行
- 构建时 T4 转换的产品仅在下一个构建中使用
- ASP.NET Core Application (.NET Framework) for Windows x64 only error in project.assets.json
- 新的 .csproj 格式 - 如何将整个目录指定为“链接文件"到子目录?
- 如何将条件编译符号(DefineConstants)传递给 msbuild
- MSBuild 支持 Visual Studio 2017 RTM 中的 T4 模板
- NuGet 包还原找不到包,没有源
