Custom RoleProvider using session

末鹿安然 提交于 2019-12-23 20:23:19

问题


I was considering using the custom MembershipProvider / RoleProviders.

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).

Any help greatly appreciated as always.


回答1:


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?

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



来源:https://stackoverflow.com/questions/1425731/custom-roleprovider-using-session

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!