M
missoula
Hello-
I can connect to my own domain fine with the following:
entry = new DirectoryEntry("LDAP://RootDSE");
However, I am trying to get information out of AD for another domain.
This domain is trusted, but I can't seem to connect to it. This is
driving me crazy. Hard coding a DC name works, but I don't want to
hard code things in my code:
entry = VbecsWindowsUser.GetValidEntry("DC_Name");
I have tried all of the following:
DirectoryEntry entry = new DirectoryEntry("domainname",
@"domainname\userid", "Password", AuthenticationTypes.Secure);
entry = new DirectoryEntry("LDAP://domainname", @"domainname\userid",
"Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("LDAP://DC=domainname",
@"domainname\userid", "Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("DC=domainname", @"domainname\userid",
"Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("LDAP://DC=domainname",
@"domainname\userid", "Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("DC=domainname", @"domainname\userid",
"Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("WinNT://DC=domainname",
@"domainname\userid", "Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("WinNT://domainname", @"domainname\userid",
"Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("WinNT://domainname", @"domainname\userid",
"Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("DC=domainname", @"domainname\userid",
"Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("domainname");
entry = new DirectoryEntry("LDAP://domain.com");
entry = new DirectoryEntry("LDAP://CN=domainname");
entry = new DirectoryEntry("LDAP://CN=domain.com");
entry = new
DirectoryEntry("LDAP://domain.com/CN=vha20jensec,CN=Users,DC=domain,DC=com");
entry = new DirectoryEntry("LDAP://DC=domain.com");
entry = new DirectoryEntry("LDAP://DC=domainname");
entry = new DirectoryEntry("WinNT://domainname");
entry = new DirectoryEntry("WinNT://domain.com");
Any help or suggestions would be much appreciated. Thanks!
I can connect to my own domain fine with the following:
entry = new DirectoryEntry("LDAP://RootDSE");
However, I am trying to get information out of AD for another domain.
This domain is trusted, but I can't seem to connect to it. This is
driving me crazy. Hard coding a DC name works, but I don't want to
hard code things in my code:
entry = VbecsWindowsUser.GetValidEntry("DC_Name");
I have tried all of the following:
DirectoryEntry entry = new DirectoryEntry("domainname",
@"domainname\userid", "Password", AuthenticationTypes.Secure);
entry = new DirectoryEntry("LDAP://domainname", @"domainname\userid",
"Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("LDAP://DC=domainname",
@"domainname\userid", "Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("DC=domainname", @"domainname\userid",
"Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("LDAP://DC=domainname",
@"domainname\userid", "Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("DC=domainname", @"domainname\userid",
"Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("WinNT://DC=domainname",
@"domainname\userid", "Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("WinNT://domainname", @"domainname\userid",
"Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("WinNT://domainname", @"domainname\userid",
"Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("DC=domainname", @"domainname\userid",
"Password!", AuthenticationTypes.Secure);
entry = new DirectoryEntry("domainname");
entry = new DirectoryEntry("LDAP://domain.com");
entry = new DirectoryEntry("LDAP://CN=domainname");
entry = new DirectoryEntry("LDAP://CN=domain.com");
entry = new
DirectoryEntry("LDAP://domain.com/CN=vha20jensec,CN=Users,DC=domain,DC=com");
entry = new DirectoryEntry("LDAP://DC=domain.com");
entry = new DirectoryEntry("LDAP://DC=domainname");
entry = new DirectoryEntry("WinNT://domainname");
entry = new DirectoryEntry("WinNT://domain.com");
Any help or suggestions would be much appreciated. Thanks!