#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    2
    Rep Power
    0

    Connection to SunONE Directory Server 5.2 through LDAP in C# code


    Hi,

    I am trying to connect to SunOne Directory Server 5.2 through LDAP in C# code. SunONE server is installed in the Win2000 Server m/c.

    I am using the following connection string:

    string adPath = "LDAP://IP Address of the Sun server";
    LdapAuthentication adAuth = new LdapAuthentication(adPath);

    string domainAndUsername = domain + "\\" + username;

    DirectoryEntry entry = new DirectoryEntry( _path, domainAndUsername, pwd);

    // Bind to the native AdsObject to force authentication.
    Object obj = entry.NativeObject;

    After this line this code throws error "The server is not operational"

    Can somebody help me in resolving this problem
  2. #2
  3. Chris Larivee
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Littleton, CO
    Posts
    72
    Rep Power
    11
    You may need to specify the port ... also - as in my post on the other site - I am not sure you can use the concept of AD domain and username to bind - as SunONE doesn't really utilize this for binds ...
  4. #3
  5. Psycho Canadian
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jan 2001
    Location
    Canada
    Posts
    4,846
    Rep Power
    635
    Not to be a pain but it says in the error "The server is not operational" so you may want to make sure the server is accessable by that computer.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    2
    Rep Power
    0
    Originally Posted by ldap4u
    You may need to specify the port ... also - as in my post on the other site - I am not sure you can use the concept of AD domain and username to bind - as SunONE doesn't really utilize this for binds ...

    Hi,

    I think that the server is not able to bind with the SunONE server as it is not able to create the Object.

    Object obj = entry.NativeObject;

    I have done further R&D and come to know that this method is only for ADSI(Microsoft). I don't know how to do it for Sun Server.

    Can u please help me in knowing how to connect to SunServer through LDAP in C# or JAVA.

    Waitinfg for ur reply.

    Regds,
    Sachinp
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    2
    Rep Power
    0
    try this link

IMN logo majestic logo threadwatch logo seochat tools logo