![](/img/trans.png)
[英]Accessing Active Directory From a Computer Not Part of the Domain With C# and Powershell
[英]c# Active Directory Authentication User if Computer not in domain
如果您使用的计算机不在域中,我如何使用C#在活动目录中验证用户名和密码?
我已经尝试过了 我现在使用的计算机不在域中。
try
{
DirectoryContext context = new DirectoryContext(DirectoryContextType.DirectoryServer, "IP", "Username", "Password");
DirectoryEntry deDoc = Domain.GetDomain(context).GetDirectoryEntry();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.