Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error The directory service is not available

Status
Not open for further replies.

pepe82

Programmer
Oct 26, 2009
1
DE
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top