本文介绍了难道SearchResultCollection的GetDirectoryEntry不得不再次查询ActiveDirectory的? [的DirectoryServices / .NET]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用DirectorySearcher从的的FindAll()的.NET方法,并在SearchResultCollection的GetDirectoryEntry()方法需要另一次旅行到Active Directory?例如......

 昏暗的SRC作为SearchResultCollection
昏暗的DS作为新DirectorySearcher从
code设置DirectorySearcher从


去到Active Directory,并填写采集与结果
SRC = ds.FindAll()

......后来在code或什么
没有了code中的下一行需要再次访问的Active Directory?
昏暗德作为的DirectoryEntry = src.item(0).GetDirectoryEntry()
 

解决方案

据它将重新查询AD以获取目录条目。文档

参考

When using the FindAll() method of the DirectorySearcher in .net, does the GetDirectoryEntry() method of the SearchResultCollection require another trip to Active Directory? e.g....

Dim src As SearchResultCollection
Dim ds As New DirectorySearcher
' code to setup DirectorySearcher


' go to Active Directory and fill collection with results
src = ds.FindAll()

'...later on in code or whatever
' does the next line of code require another trip to Active Directory?
Dim de As DirectoryEntry = src.item(0).GetDirectoryEntry()
解决方案

According to the documentation it will requery AD to get the directory entry.

Reference

这篇关于难道SearchResultCollection的GetDirectoryEntry不得不再次查询ActiveDirectory的? [的DirectoryServices / .NET]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 11:32