Results 1 to 2 of 2

Thread: DirectoryService Problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2003
    Posts
    22

    DirectoryService Problem

    I'd tried to queries my Novell LDAP server, and here is my code:

    Dim root As New System.DirectoryServices.DirectoryEntry("ldap://192.168.0.13/o=test/ou=Admin", "myname", "123456")
    Dim searcher As New System.DirectoryServices.DirectorySearcher(root)

    With searcher
    .Filter = "(uid=myname)"
    .PropertiesToLoad.Add("uid")
    .PropertiesToLoad.Add("mail")
    End With

    Dim results As SearchResultCollection
    results = searcher.FindAll

    Dim result As SearchResult
    For Each result In results
    Console.WriteLine(result.Properties("uid")(0))
    Console.WriteLine(result.Properties("mail")(0))
    Next

    It always generate unknown error at line "results = searcher.FindAll". Anyone have idea whats wrong with my code?

    Regards,
    Calvin

  2. #2
    Lively Member
    Join Date
    Feb 2007
    Posts
    77

    Re: DirectoryService Problem

    Any findings yellowcat. I am facing the same weird problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width