albuitra
asked on
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
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
http://www.codeproject.com/KB/system/everythingInAD.aspx#27
ASKER
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 ?
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 ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.