Help! I can't connect to Active Directory!
From: Amadelle (amadelle_at_yahoo.com)
Date: 10/13/04
- Next message: Patrick: "Re: Stripping IP Address out of text file?"
- Previous message: Sahil Malik: "Re: .NET Newbie Question"
- Next in thread: Jared: "Re: Help! I can't connect to Active Directory!"
- Reply: Jared: "Re: Help! I can't connect to Active Directory!"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Patrick: "Re: Stripping IP Address out of text file?"
- Previous message: Sahil Malik: "Re: .NET Newbie Question"
- Next in thread: Jared: "Re: Help! I can't connect to Active Directory!"
- Reply: Jared: "Re: Help! I can't connect to Active Directory!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|