【问题标题】:c# Active Directory Authentication User if Computer not in domainc# 如果计算机不在域中,则为 Active Directory 身份验证用户
【发布时间】:2013-07-10 15:49:28
【问题描述】:

如果您使用的计算机不在域中,我如何使用 C# 在 Active Directory 中验证用户名和密码?

【问题讨论】:

  • 到目前为止你有没有尝试过?
  • 我已经尝试了下面的答案,谢谢。 :D

标签: c# authentication active-directory


【解决方案1】:

我试过这个。我现在使用的计算机不在域中。

try
{
    DirectoryContext context = new DirectoryContext(DirectoryContextType.DirectoryServer,   "IP", "Username", "Password");
    DirectoryEntry deDoc = Domain.GetDomain(context).GetDirectoryEntry();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-12-09
    • 2015-06-06
    • 1970-01-01
    • 2020-11-26
    • 2017-10-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多