Active directory - Error:System.Runtime.InteropServices.COMException: A referral was returned from t

  • Thread starter Luis Esteban Valencia
  • Start date
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top