I have a problem with LDAP, I use apache directory server and I would add a new user .... I use Visual Studio and the code snippet is:
public static void prova(string FullName)
{
DirectoryEntry container;
DirectoryEntries ChildEntry;
container = new DirectoryEntry("LDAP://localhost:10389/cn=user1,ou=users,ou=system", "admin", "secret");
try
{
ChildEntry = container.Children;
DirectoryEntry NewEntry = ChildEntry.Add("cn=" + FullName, "user");
NewEntry.CommitChanges();
NewEntry.Close();
}
catch (Exception ex)
{
throw new Exception("Error " + ex.Message);
}
}
The problem is that I have this type of error:
The directory service is not available
somebody could help me?