Help! I can't connect to Active Directory!

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Amadelle (amadelle_at_yahoo.com)
Date: 10/13/04


Date: Wed, 13 Oct 2004 14:06:26 -0700

Hi all,
I am so desparately in need of some guidance! After two days of struggling I still can't connect to the Active Directory server. I have used so many different ways and so many different string paths and I still don't have a successful connection.

Things I have tried:

Using Directory Searcher:
DirectorySearcher ds = new DirectorySearcher();

ds.SearchRoot = new DirectoryEntry();

SearchResult rs = ds.FindOne(); //This fails

Using just DirectoryEntry:

DirectoryEntry ent = new DirectoryEntry("LDAP://myDC/CN=Users,DC=corp,DC=domainName,DC=com");

or

DirectoryEntry ent = new DirectoryEntry("LDAP://myDC.corp.domainName.com/CN=Users, DC=myDC,DC=corp, DC=domainName,
DC=com");

and many other variations of the path and I still can't connect to Active Directory and it fails. Our DC is a Windows 2003 server. I am using a Windows 2000 with VS2003 .NET and C# and I am trying to write a ASP.NET page using DirectoryServices. The Path to our LDAP is myDC.corp.domainName.com. The initial DirectoryEntry ent seems to get initialized just fine. But when I open the ent or the ds in the debugger screen .. parts of it like the children properties shows a weird message saying that there was an error with the COM object (e.g. ContainerObject <error: an exception of type: {System.Runtime.InteropServices.COMException} occurred> System.DirectoryServices.Interop.UnsafeNativeMethods.IAdsContainer). On another newsgroup someone had suggested to reference ActiveDs COM object which I did but that hasn't helped either.

At this stage I am absolutely lost and I would appreciate any type of help. I was wondering whether I would need to log on? Whether I need to use another protocol?

What am I missing,

I appreciate any insight... or any suggestions, etc.

Thanks a million,

Amadelle



Relevant Pages

  • Re: The Christmas Child............
    ... Do you imagine dozens of pregnant young girls, struggling with this ... enormous decision, going to the Yankees newsgroup for your guidance? ...
    (alt.sports.baseball.ny-yankees)
  • How to open Internet Explorer within VB6 environment?
    ... I am just asking for a little bit of your guidance and help which would be ... I am struggling to open up a web page from within a ... like it to open up Internet explorer and display the web page url which the ... just can't get the hang of it. ...
    (microsoft.public.vb.controls)
  • oldDBConnection
    ... I know my around VBA but am struggling to move over to .NET ... Any guidance much appreciated ... Rod ...
    (microsoft.public.dotnet.languages.vb)