This is the code i use:
DirectoryEntry objEntry;
DirectoryEntry objNewEntry;
objEntry = new DirectoryEntry(strPath);
DirectoryEntry ou = objEntry.Children.Find("OU=Distribution") ;
objNewEntry = ou.Children.Add("cn="+cmb_curs.SelectedItem.ToStri ng(), "group") ;
objNewEntry.Properties["groupType"].Value = ActiveDs.ADS_GROUP_TYPE_ENUM.ADS_GROUP_TYPE_GLOBAL _GROUP ;
objNewEntry.CommitChanges();
After running the code it gives me the follwing error:
A constraints violation occured
Anybody have any idea why i get this error?
Regards,
Martijn
|