title: LDAP Exception Object Class Violation : Add new User
body: <p>I am trying to create a user in an LDAP directory, but I get the following error: "Object Class Violation". Can anyone suggest a solution?</p>
  
  <pre><code>try             
  {
      DirectoryEntry ouEntry = new DirectoryEntry("LDAP://localhost:389/ou=people,dc=wso2,dc=com","cn=admin,dc=wso2,dc=com", "toto", AuthenticationTypes.Secure);
  
      DirectoryEntry childEntry = ouEntry.Children.Add("CN=tati toto", "inetOrgPerson");
      childEntry.Properties["sn"].Add("toto");
      childEntry.CommitChanges();
  }
  catch(Exception Ex)             
  {
      Console.WriteLine("Exception : "+ Ex.Message);
  }
  </code></pre>