Skip to main content

Posts

Showing posts from November, 2010

Programming AD with C#.NET – part 1

We have a pretty old class library to communicate with Active Directory, shich is built on  System.DirectoryServices . It has worked very well during all these years, but since the size of the systems and the number of users have increased we have begun to see some performance related issues. The environment that is least stable at the moment consists of a root domain and a subdomain. The problem is the following error that sometimes occur on a search in the subdomain: System.DirectoryServices.DirectoryServicesCOMException (0x8007202B): A referral was returned from the server. This is not an unusual issue, but we have taken some steps for these issues not to occur. What is also interesting is that they seem to occur at random. Once the problem occured once the subdomain is unreachable for the current application until the application or application pool is restarted. Part of the problem is some poor memory management in  SearchResultCollection , which never disposes of the COM-