【发布时间】:2018-02-28 15:53:02
【问题描述】:
我已经构建了这个函数来验证用户是否在 ActiveDirectory 中启用。
LdapConnection传输的数据是加密的?
这是通过user 和password 传输信息的安全解决方案吗?
try
{
LdapConnection connection = new LdapConnection(server);
NetworkCredential credential = new NetworkCredential(user, password);
connection.Credential = credential;
connection.Bind();
}
catch (LdapException lexc)
{
return lexc.Message;
}
catch (Exception exc)
{
return exc.Message;
}
【问题讨论】:
-
我希望您的密码是
SecureString类型。顺便说一句,我在任何地方都看不到与在 AD 中启用用户相关的代码!您能否改写您的问题以突出您的确切要求?您在说 LdapConnection 类传输的哪种数据?引用自 MSDN:The LdapConnection class creates a TCP/IP or UDP LDAP connection to Microsoft Active Directory Domain Services or an LDAP server.. -
用户 e 密码是 SecureString。我问传输的数据是否在 Ldap 通道上加密。 @Am_I_Helpful
标签: c# winforms authentication active-directory ldap