Get Distinguished Name from C#

Hi Folks,
I need to find the Distinguished Name of an LDAP for any user using c#
I only have the IP and PORT
is there any function for this ?

thanks
LVL 4
albuitraAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Alexandre SimõesConnect With a Mentor Manager / Technology SpecialistCommented:
0
 
albuitraAuthor Commented:
Thanks for the link
But it is oriented to active domain
case objectClass.user:
            mySearcher.Filter = "(&(objectClass=user)
        (|(cn=" + objectName + ")(sAMAccountName=" + objectName + ")))";
            break;
        case objectClass.group:
            mySearcher.Filter = "(&(objectClass=group)
        (|(cn=" + objectName + ")(dn=" + objectName + ")))";
            break;
        case objectClass.computer:
            mySearcher.Filter = "(&(objectClass=computer)
            (|(cn=" + objectName + ")(dn=" + objectName + ")))";
            break;


how can I do the same for any LDAP (linux, sun, ibm, oracle ) server ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.