在不使用用户名/密码的情况下访问AD以进行只读访问 [英] Accessing AD without a user name / password for read only access
问题描述
使用以下代码访问AD没问题:
I have no problems accessing AD with code like:
DirectoryEntry ldapConnection = new DirectoryEntry(ldap,ldapUser,
ldapPassword );
DirectoryEntry ldapConnection = new DirectoryEntry (ldap, ldapUser, ldapPassword);
是否可以通过DirectoryEntry访问AD,而无需提供用户名/密码。在这种情况下,我只需要读取一些属性即可。
Is there a way to access AD via DirectoryEntry without having to provide a user name / password. In this particular case, I just need to read some attributes.
推荐答案
默认情况下,Server 2003和更高版本不允许匿名查询反对AD(大多数情况下)。确保您的AD Server已正确配置为允许匿名访问。
By default, Server 2003 and later do not allow anonymous queries against AD (for the most part). Make sure your AD Server is properly configured to allow anonymous access.
操作方法(对于Win 2k8):
http://technet.microsoft.com/zh-CN/library/cc816788(v = ws.10).aspx
How-to fix (for Win 2k8): http://technet.microsoft.com/en-us/library/cc816788(v=ws.10).aspx
这篇关于在不使用用户名/密码的情况下访问AD以进行只读访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!