LDAP Error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mischa

    #1

    LDAP Error

    I am trying to create a proof of concept to show how to connect to an LDAP
    server and how to search for values but I do not get anywhere. Here is what I
    have so far:

    Dim objEntry As DirectoryEntry
    Dim objSearcher As DirectorySearch er

    Try

    objEntry = New DirectoryEntry( "ldap://www.openldap.co m/dc=OpenLDAP,dc= org",
    Nothing, Nothing, AuthenticationT ypes.Anonymous)

    objSearcher = New DirectorySearch er(objEntry, "(ou=People )")
    objSearchResult = objSearcher.Fin dOne()

    If Not objSearchResult Is Nothing Then
    'Do something
    End If

    Catch ex As Exception

    result.Text = ex.Message & vbNewLine & ex.Source

    End Try

    My code fails at the line:
    objSearchResult = objSearcher.Fin dOne()

    with the unhelpfu error of Unknown error (0x80005000)

    As you can see I use the www.openldap.com directory and I can connect
    anonymously using the Softeerra LDAP Browser 2.5

    Any help would be greatly appreciated

Working...