I get the unknow error (0x80005000) using this code:
private void btn_verwijderGG_Click(object sender, EventArgs e)
{
string OUstring = ",ou="+bx_selOU1.SelectedItem.ToString();
string GGstring = "cn="+txt_ggNaam.Text;
if (DirectoryEntry.Exists("LDAP://" + GGstring + OUstring + ",DC=Roel,DC=gui"))
{
try
{
DirectoryEntry entry = new DirectoryEntry("LDAP://" + OUstring + ",DC=Roel,DC=gui");
DirectoryEntry group = new DirectoryEntry("LDAP://" + GGstring + ",DC=Roel,DC=gui");
entry.Children.Remove(group);
group.CommitChanges();
}
catch (Exception a)
{
MessageBox.Show(a.Message.ToString());
}
}
else
{
MessageBox.Show("Group Bestaat niet");
}
}
I tried using credentials but thats hasnt worked for me either. Can someone help me out?
User contributions licensed under CC BY-SA 3.0