【发布时间】:2014-06-11 12:36:58
【问题描述】:
如何使用 asp.net 中的应用程序池标识将 AD 与 LDAPConnection 连接。
应用程序正在使用 LDAP 连接从 AD 加载用户详细信息。目前要连接 AD,用户名和密码存储在 web.config 中,我们使用以下代码连接 AD
// Create an LDAP connection to the server
LdapConnection connection = new LdapConnection(ldapServerName);
NetworkCredential networkCredential = new NetworkCredential(userName, password, domainName);
connection.Bind(networkCredential);
我如何使用 ASP.Net 应用程序池身份来连接 AD,而不是使用来自 web.config 的凭据?
【问题讨论】:
标签: asp.net active-directory ldap