我有LDAP的一個問題,我使用Apache目錄服務器,我想補充一個新的用戶.... 我使用Visual Studio和代碼片段:LDAP錯誤:目錄服務不可用
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 directory service is not available
有人能幫助我嗎?