使用Windows身份验证,主域和信任域之间的信任关系失败,调用IsInRole当 [英] With windows authentication, The trust relationship between the primary domain and the trusted domain failed, when calling IsInRole

查看:348
本文介绍了使用Windows身份验证,主域和信任域之间的信任关系失败,调用IsInRole当的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的asp.net web服务器设置为使用Windows身份验证。

I have my asp.net web server setup to use windows authentication.

据认证只是我目前登录的用户的罚款。

It is authenticating just fine with my current logged in user.

我可以通过查看验证这一点......

I can verify this by viewing ...

HttpContext.Current.User.Identity.Name

和我可以验证通过查看我验证...

And I can verify that I am authenticated by viewing...

HttpContext.Current.User.Identity.IsAuthenticated

然而,当我打电话.IsInRole功能我得到的信任关系错误...

However, when I call the .IsInRole function I get the trust relationship error...

HttpContext.Current.User.IsInRole("accounting")

我已经找到了与角色名(域\\会计)提供域名问题的在线参考,但我仍然得到同样的错误。在哪里看或解决问题有什么建议?

I have found online references to problems with supplying domain name with the role name (domain\accounting), but I still get the same error. Any suggestions on where to look or troubleshoot the problem?

推荐答案

好吧,看来,如果你引用一个角色不存在,那么你得到的信任域错误。

Well, it seems that if you are referencing a Role that doesn't exist then you get the trusted domain error.

错误走了,当我改变了code运作就好了...从

The error went away and the code functioned just fine when I changed from ...

HttpContext.Current.User.IsInRole("accounting") 

实际组名...

to the actual group name ...

HttpContext.Current.User.IsInRole("rsi_accounting") 

这篇关于使用Windows身份验证,主域和信任域之间的信任关系失败,调用IsInRole当的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆