Link to home
Start Free TrialLog in
Avatar of liebrand
liebrandFlag for United States of America

asked on

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
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

What is the full text of the Interop exception?
Avatar of liebrand

ASKER

I figured it out...  the path had to have an uppercase LDAP:// (i had ldap://)   very strange....


I would like to close this PAQ.
You need to post a question in Community Support to close this question.
ASKER CERTIFIED SOLUTION
Avatar of liebrand
liebrand
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial