In association with heise online

The H

General discussion about the site and its contents

  • Forums
  • > The H
  • > LDAP Error:The directory service is not available

LDAP Error:The directory service is not available 26 October 2009 12:18

Hi

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 

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?