eDirectory/LDAP and VB.NET

I am attemping to connect to our eDirectory using VB.NET via LDAP and I keep getting a "InteropServices.COMException" exception. I am able to connect to our eDirectory using an LDAP Browser anonymously. Here is a snippet of my code:

Imports System.DirectoryServices

Public Sub New()
    dim root as new directoryEntry("ldap://xx.xxx.x.xxx")
    dim searcher as new directorysearcher(root)
    search.filter = ("cn=Username")
    search.searchscope = searchscope.subtree
    dim results as searchresultcollection
    results = search.findall()    <--- failing here
End Sub

Any assistance would be appreciated
LVL 15
liebrandAsked:
Who is Participating?
 
liebrandAuthor Commented:
Ok -- thanks...

I was re-reading the directoryservices overview and I saw this under the path property:

"Note   The portion of the Path that identifies the provider (precedes "://") is case sensitive. For example, "LDAP://" or "WinNT://"."
0
 
Bob LearnedCommented:
What is the full text of the Interop exception?
0
 
liebrandAuthor Commented:
I figured it out...  the path had to have an uppercase LDAP:// (i had ldap://)   very strange....


I would like to close this PAQ.
0
 
Bob LearnedCommented:
You need to post a question in Community Support to close this question.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.