本文介绍了如何编辑这个多个主体包含匹配的身份错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误

多个主体包含匹配的身份

我的代码:



GroupPrincipal grp = GroupPrincipal。 FindByIdentity(ctx,IdentityType.Name,groupName);

if(grp!= null)

{

foreach(校长p in grp。 GetGroups())

{

if(p.StructuralObjectClass ==group)

{

if (userGroupList.IndexOf(p.Name)== -1)

{

userGroupList.Add(p.Name);

getGroupName( ctx,p.Name,userGroupList);

}

}

}

}







请帮帮我。

error
Multiple principals contain a matching Identity
my code:

GroupPrincipal grp = GroupPrincipal.FindByIdentity(ctx,IdentityType.Name,groupName);
if (grp != null)
{
foreach (Principal p in grp.GetGroups())
{
if (p.StructuralObjectClass == "group")
{
if (userGroupList.IndexOf(p.Name) == -1)
{
userGroupList.Add(p.Name);
getGroupName(ctx, p.Name, userGroupList);
}
}
}
}



please help me.

推荐答案


这篇关于如何编辑这个多个主体包含匹配的身份错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 18:12