I\'ve written some code but not works it throws Exception \"An operations error occurred.\" code --->
DirectoryEntry dirEntry = new DirectoryEntry(\"LDAP pat
When you are already using a DirectoryEntry there is no need for PrincipalContext or UserPrincipal.
You can simply use the DeleteTree() method:
DeleteTree()
DirectoryEntry dirEntry = new DirectoryEntry("LDAP path", "admin-username", "admin-password"); dirEntry.DeleteTree();