I create new DirectoryEntry and I have exception in it
(system.runtime.interopservices.comexception).
Previous DirectoryEntry is open ok (directoryEntry).
In directoryEntry.Properties["manager"].Value is correct value.
using (DirectoryEntry manager = new DirectoryEntry(Convert.ToString(directoryEntry.Properties["manager"].Value)))
{
contact.ManagersGuid = manager.NativeGuid;
}
Do you know where could be a problem? More opened directory entries in same moment?
What is stored in
Properties["manager"].Value? My hunch is: that’s not a complete, valid LDAP path……If my hunch is correct, then you’re not getting back a valid
DirectoryEntryfor the manager.Try this code instead: