我想用C#连接到我们的本地Active Directory.
我发现这篇文章很好.
但我真的不知道如何通过LDAP连接.
有人可以解释如何使用询问的参数吗?
示例代码:
static DirectoryEntry createDirectoryEntry()
{
// create and return new LDAP connection with desired settings
DirectoryEntry ldapConnection = new DirectoryEntry("rizzo.leeds-art.ac.uk");
ldapConnection.Path = "LDAP://OU=staffusers,DC=leeds-art,DC=ac,DC=uk";
ldapConnection.AuthenticationType = AuthenticationTypes.Secure;
return ldapConnection;
}
Run Code Online (Sandbox Code Playgroud)
我只有Active Directory服务器的主机名和IP地址.什么DC=xxx,DC=xx
等等意味着什么?