471,348 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,348 software developers and data experts.

ASp.net and ldap problem..please help!!

I am trying to connect to my college LDAP directory using ASP.NET. This LDap
does not have security as it returns only user demographic information.
I can only bind anonymously to this ldap. This means binding without a
username or credentials.
What i am trying to do is, i am trying to look up all the information for
the user with user id 'testuser'. The following is the Vb.net code for my
aspx page:

Dim oRoot As DirectoryEntry = New
DirectoryEntry("LDAP://directory.x.y/ou=People,dc=x,dc=y")
Dim oSearcher As DirectorySearcher = New DirectorySearcher(oRoot)
Dim oResult As SearchResult
Dim propName As String
Dim obProp As Object

Try
oSearcher.Filter = "uupid=testuser"
oResult = oSearcher.FindOne
For Each propName In oResult.Properties.PropertyNames
For Each obProp In oResult.Properties(propName)
Response.Write("name= " & propName)
Response.Write("value= " & obProp)
Next
Next
Catch Ex as Exception
End Try

The above code fails at the line "oResult = oSearcher.FindOne" and gives me
an error which is useless: "Unknown error (0x80005000)"
Please help me!! Thanks in advance.

Jul 29 '05 #1
0 1091

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Tiraman | last post: by
9 posts views Thread by weidongtom | last post: by
reply views Thread by sa6113 | last post: by
reply views Thread by Ronak mishra | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.