Hi folks,
I have been trying (in C# 2.0) using several ways to add an LDAP Member object to a group.
Below you can see the code and two of the ways I tried:
I have also tried:
groupEntry.Invo ke("Add", new object[] { newEntry.Path });
In this case I get:
"Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWN NAME))"
right after the Invoke method!
Any help or comment is most appricated!
I have been trying (in C# 2.0) using several ways to add an LDAP Member object to a group.
Below you can see the code and two of the ways I tried:
Code:
DirectoryEntry newEntry;
//.....
// Creating the LDAP member entry.....no problems here!!!
//....
using (DirectoryEntry groupEntry = GetGroupEntry())
{
groupEntry.Properties["member"].Add(newEntry.Path);
groupEntry.CommitChanges(); <-- Exception here
}
COMException: ex = {"The attribute type specified to the directory service is not defined. (Exception from HRESULT: 0x8007200C)"}
groupEntry.Invo ke("Add", new object[] { newEntry.Path });
In this case I get:
"Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWN NAME))"
right after the Invoke method!
Any help or comment is most appricated!
Comment