阅读背景:

WindowsPrincipal.IsInRole()未返回预期结果

来源:互联网 

So here's my current code:

所以这是我目前的代码:

List<string> rowGroups = GetFileGroups((int)row.Cells["document_security_type"].Value);
bool found = false;
System.Security.Principal.WindowsPrincipal p = new System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent());

foreach (string group in rowGroups)
{
  if (p.IsInRole(group))
  {
    found = true;
    break;
  }
}
List



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: