Last post Dec 17, 2006 10:19 AM by Chmmr
Dec 17, 2006 10:19 AM|Chmmr|LINK
We've encountered a problem with accessing the Active Directory in a web environment, and haven't been able to solve it.
We have the following line, getting a directory entry:
DirectoryEntry rootDirectoryEntry = new DirectoryEntry(LDAP://XXX.XXX.XXX.XXX);
DirectorySearcher deSearch = new DirectorySearcher();
deSearch.RootDirectory = rootDirectoryEntry;
deSearch.Scope = Scope.SubTree;
This works, either in winforms or in ASP.NET, if we run it at the local server, meaning, we're accessing it through the same computer that hosts it.
But, when accessing the same page through a different computer, it fails on the following line, afterwards:
SearchResultCollection SearchResults = deSearch.FindAll();
Exception Details: System.Runtime.InteropServices.COMException: An operations error occured.
We're working with impersonation, though we've checked it with anonymous access as well, with no luck. It seems to be some kind of permissions problem, though we don't know how to approach it.
Any help would be appreciated.