|
-
Jan 14th, 2004, 04:53 AM
#1
Thread Starter
Junior Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|