LDAP authentication works with any random domain name.
void MainX()
{
NetworkCredential netCred1 = new NetworkCredential("user1", "pass", "aaaaa");
LdapDirectoryIdentifier _LdapId1 = new LdapDirectoryIdentifier( IP + ":" + 389, true, false);
LdapConnection ldap = new LdapConnection(_LdapId1, netCred1, AuthType.Negotiate);
ldap.SessionOptions.SecureSocketLayer = false;
ldap.SessionOptions.ProtocolVersion = 3;
ldap.Bind();
ldap.Dispose();
}
I ran 'network Monitor' and found that NEGOTIATE resolves to NTLM. My machine is not part of domain (aaaaa); DC is on Windows 2008 R2.. BASIC security scheme validates domain name. So this is something to do with security scheme.
Please let me know if anyone knows more about this.
Thanks
Ramesh