Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to response quickly to AD retrieval
    primarykey
    data
    text
    <p>I am developing a SharePoint application which needs users from a specified Windows Server 2003 Active Directory Organizational Unit. </p> <p>Firstly I wasn't concerned about the 'Dispose' and 'Close' operations on DirectoryServices objects. In this point the retrieve operations were quick and successful. </p> <p>But this was causing 'Server is not operational' error after 2ish attempts. And this error makes the whole application operates worse like stopping other AD operations.</p> <p>Then, I corrected this error by adding using statements on every DirectoryEntry, DirectorySearcher and SearchResultCollection objects.</p> <p>Then I have reached a point that I have no longer get 'Server is not operational' error. But when I try to retrieve users from AD 1 or more times by using DirectorySearcher.FindAll method, the first one operates quick and successfully, others more slowly but successfully. It kinda takes the duration of a timeout. Could you please help me with my situation about this slow down?</p> <p>Here is the sample code:</p> <pre><code>using (DirectoryEntry directoryEntry = new DirectoryEntry(connectionString, userName, password)) { using (DirectorySearcher search = new DirectorySearcher(directoryEntry)) { search.SearchScope = SearchLevel.OneLevel; search.ReferralChasing = ReferralChasingOption.All; search.Filter = filter; search.SizeLimit = 200; //Limits the property count for search result SetUserDirectorySearcherPropertiesToLoad(search); using (SearchResultCollection result = search.FindAll()) { foreach (SearchResult searchResult in result) { // Get user attributes }}}} </code></pre> <p>Thanks in advance</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload