![](/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.