問(wèn)題描述
當(dāng)我嘗試根據(jù)角色從 AD 獲取所有用戶時(shí)出現(xiàn)異常:
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 拋出異常超出大小限制 我嘗試實(shí)現(xiàn)分頁(yè).
With help of this thread : LdapConnection SearchRequest throws exception for "The size limit was exceeded I tried implementing paging.
現(xiàn)在出現(xiàn)異常:
服務(wù)器不支持控件.控制至關(guān)重要.
The server does not support the control. The control is critical.
關(guān)于如何解決它的任何想法?我得到一個(gè)較小的基于角色的用戶列表,無(wú)需分頁(yè).謝謝.
Any ideas on how to go about resolving it? I get a smaller list of role based users fine without paging. Thanks.
更新:我在這里找到了檢查 AD 是否支持分頁(yè)的代碼 iPlanet LDAP 和 C# PageResultRequestControl 我得到了支持分頁(yè)的結(jié)果.
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.
推薦答案
針對(duì)帖子發(fā)布的解決方案 分頁(yè) LDap 搜索因請(qǐng)求的屬性不存在"而失敗 也幫助我解決了我的問(wèn)題.我正在使用 AuthType.Basic 并將其更改為 AuthType.Ntlm 使分頁(yè)代碼運(yùn)行良好.我懷疑它會(huì)影響我擁有的任何其他 AD 代碼,但如果我發(fā)現(xiàn)任何需要注意的地方,我會(huì)檢查并發(fā)布.
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.
謝謝.
這篇關(guān)于如何解決“服務(wù)器不支持控件.控制至關(guān)重要."活動(dòng)目錄錯(cuò)誤的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!