Solved

Get Distinguished Name from C#

Posted on 2008-06-19
5
2,733 Views
Last Modified: 2013-12-16
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
0
Comment
Question by:albuitra
5 Comments
 
LVL 7

Expert Comment

by:YourReference
ID: 21827202
0
 
LVL 4

Author Comment

by:albuitra
ID: 21832474
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
 
LVL 30

Accepted Solution

by:
Alexandre Simões earned 500 total points
ID: 21867033
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question