Я пытаюсь добавить два разных внешних адреса электронной почты для контактов в Active Directory. Я столкнулся со следующим COMException: A constraint violation occurred.
Here is the DirectoryEntry path= "LDAP://CN=s0010109,OU=RSVContacts,DC=domain,DC=com"
Вот код:
DirectoryEntry entryAD = new DirectoryEntry("LDAP://CN=s0010109,OU=RSVContacts,DC=domain,DC=com");
DirectorySearcher myADSearcher = new DirectorySearcher(entryAD);
SearchResultCollection resultAD = myADSearcher.FindAll();
entryAD.Properties["targetaddress"].Value = new string[] { "SMTP:" + "[email protected]", ""SMTP:" + [email protected]"}; //;
entryAD.CommitChanges();