我希望修改一个站点以跨域进行验证,但是当以其他域的用户身份运行和登录时,它会给出以下错误。您能否建议需要将什么安全设置应用于 ASP.Net 应用程序池才能启用此功能?
The user name or password is incorrect
[DirectoryServicesCOMException (0x8007052e): The user name or password is incorrect.
]
System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +596521
System.DirectoryServices.DirectoryEntry.Bind() +44
System.DirectoryServices.DirectoryEntry.RefreshCache(String[] propertyNames) +77
System.DirectoryServices.AccountManagement.ADStoreCtx.LoadDomainInfo() +872
System.DirectoryServices.AccountManagement.ADStoreCtx.get_UserSuppliedServerName() +129
System.DirectoryServices.AccountManagement.ADStoreCtx.IsMemberOfInStore(GroupPrincipal g, Principal p) +976
[AuthenticationException: The user name or password is incorrect.
]
System.DirectoryServices.AccountManagement.ADStoreCtx.IsMemberOfInStore(GroupPrincipal g, Principal p) +2103
正在运行的代码 - 仅显示与查询相关的对象
string Domain = userName.Split('\\')[0];
var pc = new PrincipalContext(ContextType.Domain, Domain);
var gpGeneral = GroupPrincipal.FindByIdentity(pc, "GroupName");
up.IsMemberOf(gpGeneral)