DirectoryEntry GlobalCatalog

K

kenguil

I'm hoping that this is the right group to post this to and that
someone will have an answer to this.

Environment:
1) Laptop joined to domain "foo.com", logged in using cached
credentials
2) Test Virtual Server DC/GC is PDC of Domain "bar.local" with Loopback
adapter as its NIC (laptop can PING the Test Virtual server via the
loopback adapter)

Problem:
I'm using the following code inside of a try-catch block to try to
connect to a GC in "bar.local" from the host operating system:

try
{
....
DirectoryEntry deGC = new DirectoryEntry( "GC://bar.local",
@"bar\administrator", "password", AuthenticationTypes.Secure );
....
}
catch( COMException COMe )
{
....

my catch block doesn't catch an error, so I feel that I'm safe to use
my DirectoryEntry object as the passed object to the DirectorySearcher
function [DirectorySearcher seek = new DirectorySearcher( deGC );].
This gives me an error (caught in the new try-catch block) of 'The
specified domain either does not exist or could not be contacted'.
Looking at the DirectoryEntry object via Visual Studio and I can see an
error of '<error: an exception of type:
{System.Runtime.InteropServices.COMException} occurred>' in the GUID
and NativeGUID fields.

I've verified that I am able to log on to the Virtual Server using the
account specified and I'm able to PING the server. I've verified that
the IP settings are correct and that the DC/GC is the DNS and WINS
server over the loopback adapter. The laptop receives it's wireless IP
address and Internet access via my home network (call it domain
"fubar.none") and I receive the same result when I try to access that
domain [DirectoryEntry("fubar.none", "administrator", "otherPassword",
AuthenticationTypes.Secure);].

Does anyone have any pointers on what I should be looking for next?
I'm starting to pull my hair out and I'm bald enough already...

Thank you,
Ken
 
M

Marc Scheuner [MVP ADSI]

try
{
DirectoryEntry deGC = new DirectoryEntry( "GC://bar.local",
@"bar\administrator", "password", AuthenticationTypes.Secure );

I would try GC://dc=bar,dc=local as your bind string.

Marc
================================================================
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top