Hi Folks,

I get an error message "Error accessing the OLE registry" when I try to
query the Active Directory from my ASP.NET application.
There is no error on local machine and testing machine. But such error
occurs only on production machine.
Does anyone know its resolution?


Code Snippet:
DirectorySearcher directorySearcher = new
System.DirectoryServices.DirectorySearcher(new DirectoryEntry(adServer,
connectionUserID, connectionPassword));
directorySearcher.PropertiesToLoad.Add("memberof");
//Filter the searcher object for passed userID.
directorySearcher.Filter =
"(&(objectClass=user)(objectCategory=user)(samaccountname=" + (userID.Trim())
+ "))";
resultCollection = directorySearcher.FindAll(); ----Error occurs here.