【发布时间】:2012-04-29 14:08:23
【问题描述】:
我正在尝试检测用户是否必须在 Active Directory 中重置其密码。我正在使用用 C# 编写的控制台应用程序。
我正在尝试运行 GoDaddy 上的虚拟专用服务器
string strUserName = userName;
user = new DirectoryEntry("LDAP://0.0.0.0", "GodadyLogiUserInfo", "GodadyLogiUserPass", AuthenticationTypes.Secure);
DirectorySearcher searcher = new DirectorySearcher(user);
searcher.Filter = "(SAMAccountName=" + <USERWHICHNEEDTOTEST>+ ")";
searcher.CacheResults = false;
// Find user
SearchResult result = searcher.FindOne();
user = result.GetDirectoryEntry();
报错
服务器无法运行。
我在 SOF 和很多网站上尝试了很多方法,但都找不到。
【问题讨论】:
标签: c# active-directory ldap