C# ActiveDirectory 不断返回 false。为什么?
我知道我的帐户用户名和密码。我可以登录域中的任何 PC。 Console.WriteLine("User Name: " + userName + " Password: " + tb.Text.ToString().Trim()…
GroupPrincipal.GetMembers(true) - 指定的目录服务属性或值不存在
我有一个问题,我在网上搜索过,但没有找到可接受的原因或解决方案。 我的目标是创建一个控制台应用程序来获取组及其子组的成员。我可以使用 Director…
使用 System.DirectoryServices.AccountManagement 查找组成员身份
我正在尝试使用 .NET 4 应用程序 (VisualStudio 2010) 中的 AccountManagement 命名空间/程序集中的类型对 Active Directory 进行用户身份验证。这是…
使用 DirectoryServices.AccountManagement 在 Active Directory 中搜索具有特定属性的用户
我是访问 Active Directory 的新手,建议我使用 System.DirectoryServices.AccountManagement 命名空间,但我不知道如何在其中搜索具有特定首字母缩写…
UserPrincipal.FindByIdentity 坚持“服务器上没有这样的对象。”
我目前的目标是使用 System.DirectoryServices.AccountManagement 程序集中的实用程序为基于域安全组的 ASP.NET 应用程序实现只读角色提供程序。我有…
使用自定义 UserPrincipal 时,PrincipalSearcher.FindAll 返回不同的结果
鉴于下面的代码, using (var context = new PrincipalContext(ContextType.Domain, SOME_DOMAIN)) using (UserPrincipal userPrincipal = new UserPr…
帐户激活的安全性如何?
我正在 Django 中从头开始编写帐户激活过程,这是我的基本思维过程: 创建一个模型, class UserAccountActivation(models.Model): lock = models.Cha…
使用 C# 和 AccountManagment 命名空间从远程计算机上的管理员组中删除用户帐户
我有代码: public bool RemoveUserFromAdministratorsGroup(UserPrincipal oUserPrincipal, string computer) { try { PrincipalContext oPrincipalC…
更新 UserPrincipal 上的名称字段
当我尝试更新 UserPrincipal(实际上是主体)上的名称字段(对应于 CN)时,在调用 UserPrincipal.Save() 时收到错误“服务器不愿意处理请求”。 我已…
如何确定谁有权修改 Active Directory 组
我正在努力创建一个管理界面,允许管理 Active Directory 中组中的用户。 我只想在活动用户实际上有权添加或删除这些组中的其他用户时才向该用户显示…
正在寻找完整的 S.DS.AM 示例,其中许多 AD 扩展已编写
System.DirectoryServices.AccountManagement 可以扩展以支持用于读取和写入 AD 属性的其他属性。 有人知道适用于 AD、Exchange 2003 或 2010 的完整/…
如何使用 C# .Net 3.5 优化分解 AD 组
我需要检索数百个 AD 组的组成员。虽然下面的代码给出了正确的答案,但速度非常慢。是否有更有效的方法将这些组分解为其成员? 我当前的方法是使用 Sy…
新创建的用户无法验证
using(PrincipalContext cntx = new PrincipalContext( ContextType.Domain, "blah.corp.net:389", "OU=customers,OU=web,CN=blah,CN=corp,CN=net", …