I am trying to connect to an AD server from a computer that is outside the domain. the connection is working fine if i am trying with the flags ADS_SECURE_AUTHENTICATION | ADS_READONLY_SERVER
but when i am trying to add the use_ssl flag, its fail.
HRESULT hr = ADsOpenObject(
Path,
"administrator",
"password",
ADS_USE_SSL | ADS_SECURE_AUTHENTICATION | ADS_READONLY_SERVER, // Use Secure Authentication, allow readonly servers
IID_IADs,
(void**)&pObject
);
the return value is: -2147016646 i look for it and found that in hex it mean ldap server is down, but it on.
i did install the certificate on the computer i am trying to connect from.
Thanks.