Я подключаюсь к системе Linux через соединение ldap, когда я хочу добавить каталог, у меня возникает проблема в добавлении дочернего к EntryDirectory, myDirectoryEntry.CommitChanges ();есть исключение
static void Add(DirectoryEntry entry)
{
DirectoryEntries myEntries = entry.Children;
DirectoryEntry myDirectoryEntry = myEntries.Add("AccountNumber=3", "simpleSecurityObject");
myDirectoryEntry.Properties["sn"].Value = 3;
myDirectoryEntry.Properties["firstname"].Value = "test name";
myDirectoryEntry.Properties["lastname"].Value = "test family";
myDirectoryEntry.CommitChanges();
entry.CommitChanges();
Console.WriteLine(myDirectoryEntry.Name + " entry is created in container.");
}