自定义RoleProvider使用会话 [英] Custom RoleProvider using session

查看:124
本文介绍了自定义RoleProvider使用会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用的是自定义的MembershipProvider / RoleProviders考虑。

I was considering using the custom MembershipProvider / RoleProviders.

不幸的是,安全层,我们现在有一些需要的东西会​​被设置。所以,当的isUserInRole()方法被调用时,Session对象总是空,因会议材料是所有prepopulated。

Unfortunately, the security layer we currently have requires some session stuff being set. So, when the IsUserInRole() method is called, the Session object is always null, due to the Session stuff being all prepopulated.

我如何将能够解决这个问题,并保留使用基于会话的安全模型中,我们有什么建议?

Any suggestions on how I would be able to work around this, and retain the use of the Session based security model we have?

(我没有写出来,和我有使用它)。

(I didn't write it, and I have got to use it).

任何帮助非常AP preciated一如既往。

Any help greatly appreciated as always.

推荐答案

可能需要一些这方面的code。

Might need some code on this.

这几乎是一定的,你需要读取访问到您的会话,因为它听起来似乎有些授权标志被保存在那里?

It's almost certain you will need read access to your session as it sounds like some authorisation flag is kept there?

这可能排除了这一点,对你来说,有这样的论坛的读注意ScottGu的答案

This might rule this out for you, have a read of this forum, note ScottGu's answers

这篇关于自定义RoleProvider使用会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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