Solved

eDirectory/LDAP and VB.NET

Posted on 2003-11-19
5
1,492 Views
Last Modified: 2008-02-01
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
0
Comment
Question by:liebrand
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9781407
What is the full text of the Interop exception?
0
 
LVL 15

Author Comment

by:liebrand
ID: 9781418
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
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9781423
You need to post a question in Community Support to close this question.
0
 
LVL 15

Accepted Solution

by:
liebrand earned 0 total points
ID: 9781433
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

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question