471,354 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Asp.NET and LDap problem

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.
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 27 '05 #1
0 1044

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by dmcconkey | last post: by
7 posts views Thread by Amar | last post: by
1 post views Thread by Andrew | last post: by
5 posts views Thread by Bryan | last post: by
4 posts views Thread by Terry Miller | last post: by
1 post views Thread by Laszlo Nagy | last post: by
10 posts views Thread by Cruelemort | 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.