【发布时间】:2011-02-01 22:33:36
【问题描述】:
我有一个用户,当我尝试使用以下任一方法枚举她的组时
System.Security.Principal.WindowsIdentity.GetCurrent().Groups 在用户的计算机上
或 System.Web.HttpContext.Current.Request.LogonUserIdentity.Groups 在 IIS 服务器上,我得到了他们旧组的列表,而不是他们的新组。
我已经检查了他们进行身份验证的 DC,并且 ASP.NET 页面在 SharePoint 实例中运行,因此最喜欢的 LogonUserIdentity 是从那里提供的 Kerberos 票证。
我是否应该直接从 AD 中查找组,而不是依赖 WindowsIdentity 或 LogonUserIdentity?
【问题讨论】:
-
这样就完成了循环。该组的令牌从未刷新,直到她被添加回旧组并再次被删除。此外,她被从新组中删除并重新添加到组中。这足以导致某些内容被重置并强制组在 LoginUserIdentity 中正确表示。
标签: asp.net active-directory credentials