Question : Get a list of users from Novell LDAP

I am trying to get a list of users from a Novell LDAP implementation using VB.NET. I know i am able to connect to their LDAP and get users using a different application (Softerra LDAP Administrator 2009.2) but cant seem to get it to work in VB.Net using the code below so please let me know what i am doing wrong and how i can interact with this LDAP instance.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
        Dim oRoot As DirectoryEntry = New DirectoryEntry()
        oRoot.Path = "LDAP://XXX.XXX.com/uid=XXX,ou=XXX,dc=XXXXX,dc=com"
        oRoot.Password = "XXXXXXXXXXXXXX"
 
        Dim oSearcher As DirectorySearcher = New DirectorySearcher(oRoot)
        Dim oResults As SearchResultCollection
        Dim oResult As SearchResult
        Dim RetArray As New Hashtable()
        Try
 
            oSearcher.PropertiesToLoad.Add("uid")
            oSearcher.PropertiesToLoad.Add("givenname")
            oSearcher.PropertiesToLoad.Add("cn")
            oResults = oSearcher.FindAll()
            For Each oResult In oResults
 
                If Not oResult.GetDirectoryEntry().Properties("cn").Value = "" Then
                    RetArray.Add(oResult.GetDirectoryEntry().Properties("uid").Value, _
                      oResult.GetDirectoryEntry().Properties("cn").Value)
                End If
 
            Next
 
        Catch ex As Exception
 
            MsgBox(ex.ToString)
        End Try

Answer : Get a list of users from Novell LDAP

I tried their suggestion, changing the code to:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
        oRoot.Path = "LDAP://directorydev.assurant.com/ou=ARC,dc=assurant,dc=com"
        oRoot.Username = "assurant\XXXXXXXXX"
        oRoot.Password = "XXXXXXXXXXX"
 
Now i am getting an "Unknown user name or bad password" error which implies i have something formatted wrong?
 
I did try this
        oRoot.Path = "LDAP://directorydev.assurant.com/[email protected],ou=ARC,dc=assurant,dc=com"
        oRoot.Password = "XXXXXXXXXXXX"
 
And now im back to the "a local error hs occured" problem
Random Solutions  
 
programming4us programming4us