L
Luis Esteban Valencia
need help in accessing the Active directory users in my ASP.Net page.
Please see this code - which works but I need little more info -
Dim de As New DirectoryEntry
de.Path = "LDAP://Main-ntserverLast"
For Each obj As DirectoryEntry In de.Children
Response.Write(obj.Name & "- Name <br>")
Response.Write(obj.Parent.Name.ToString() & " - Parent<br><br>")
Next
Output of this code
CN=Builtin- Name
DC=semiconductor - Parent
OU=CAD_Dept_Users- Name
DC=semiconductor - Parent
---- Many more OU and DC values.
WHAT I NEED now is get the users of one of these OUs. i.e the objects in the
next level. I tried specifying the parameters in the binding path like this
de.Path = "LDAP://Main-ntserverLast"
/CN=Users,OU=CAD_Dept_usersname,DC=semiconductor" but I get an error
System.Runtime.InteropServices.COMException: A referral was returned from
the server
Please see this code - which works but I need little more info -
Dim de As New DirectoryEntry
de.Path = "LDAP://Main-ntserverLast"
For Each obj As DirectoryEntry In de.Children
Response.Write(obj.Name & "- Name <br>")
Response.Write(obj.Parent.Name.ToString() & " - Parent<br><br>")
Next
Output of this code
CN=Builtin- Name
DC=semiconductor - Parent
OU=CAD_Dept_Users- Name
DC=semiconductor - Parent
---- Many more OU and DC values.
WHAT I NEED now is get the users of one of these OUs. i.e the objects in the
next level. I tried specifying the parameters in the binding path like this
de.Path = "LDAP://Main-ntserverLast"
/CN=Users,OU=CAD_Dept_usersname,DC=semiconductor" but I get an error
System.Runtime.InteropServices.COMException: A referral was returned from
the server