I managed to set up an windows 2003 Active Directory for SSL, both StartTLS and LDAPS, this I have verified using the Ldp.exe from Windows Resource Toolkit. I am also able to query the contents of the directory using LdapConnection object in C# .NET.
I would like to proceed to use SSL for my Active Directory queries, for example:
I have tried using
domain = Domain.GetDomain(new DirectoryContext(DirectoryContextType.DirectoryServer, mydomain + ":636", username, password));
But it seems to not be talking LDAPS to the port 636, I get the following Exception
System.DirectoryServices.ActiveDirectory.ActiveDirectoryObjectNotFoundException: Domain controller "ad.rambutan.com:636" does not exist or cannot be contacted.
The same goes for Forest.GetForest.
Is there a way to get Domain.GetDomain to work over SSL? Either StartTLS or LDAPS would be fine.