【发布时间】:2012-12-07 15:49:16
【问题描述】:
我们正在尝试在使用 Active Directory 进行授权的 ASP.NET MVC 应用程序中实现密码过期处理机制,并且我们需要访问最大密码期限值以提供正确的过期期限。但是,我们无法使用 DirectoryEntry API 通过这些说明(或类似方法)访问值/属性:
How can I get 'minimum password age' of user in active directory using asp.net?
Determine the maximum password age in Active Directory
在每种情况下,我们只为属性maxPwdAge 获得一个NULL 值。我们还查询MaxPwdAge、MaxPasswordAge 和MaximumPasswordAge(一些消息来源建议使用不同的属性名称)。我们还搜索了不同的域对象,即根容器和用户容器,但均无济于事。
有没有办法使用 DirectoryEntry API 以编程方式查找最大密码期限。或者,PrincipalContext API?
【问题讨论】:
标签: c# asp.net asp.net-mvc active-directory