directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre-Arnaud Marcelot ...@marcelot.net>
Subject Re: LDAP Error:The directory service is not available
Date Mon, 26 Oct 2009 11:18:07 GMT
Hi,

I believe you need to use the full DN of the user in your DirectoryEntry
creation.

Maybe the following code would work better...

DirectoryEntry("LDAP://localhost:10389/cn=user1,ou=users,ou=system",

"uid=admin,ou=system", "secret");


Hope this helps,
Pierre-Arnaud

On Mon, Oct 26, 2009 at 12:10 PM, pepe_gaetano <pepe_gaetano@live.it> wrote:

>
> 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?
> --
> View this message in context:
> http://www.nabble.com/LDAP-Error%3AThe-directory-service-is-not-available-tp26057800p26057800.html
> Sent from the Apache Directory Project mailing list archive at Nabble.com.
>
>

Mime
View raw message