
索引请点击这里
1.连接
如果要连接AD服务器,首先要知道LDAP地址,LDAP地址一般形如:LADP://xxx.com。可以使用下面的代码进行连接:
DirectoryEntry entry = new DirectoryEntry(strLDAP, strAdminUserName, strAdminPwd, AuthenticationTypes.Secure);
其中,DirectoryEntry是封装Active Directory域服务层次结构中的节点或对象的类。
2.查询
成功连接服务器后,可以对AD中的节点进行查询,比如下面...