具有角色的表单身份验证 [英] Forms Authentication with role
本文介绍了具有角色的表单身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在asp.net中使用角色管理.
解决方案
^ ]文章可能会对您有所帮助.
将此代码添加到Web.Config文件中:
< 配置 > ; < system.web > < 授权 > < 允许 =" Manager" / < 拒绝 =" " *" / > < /authorization > < /system.web > < /configuration >
现在,您必须将存储在数据库中的角色映射到每个请求中的用户帐户,以便ASP.NET可以确定请求者是管理员还是其他管理员(例如,S/w开发人员).
希望对您有所帮助.
HI.
单击此处获取答案
>
how to work with role management in asp.net.
解决方案
Role-based Security with Forms Authentication[^] article from CP might help you.
Add this code to your Web.Config File :
<configuration> <system.web> <authorization> <allow roles="Manager" /> <deny users=""*"" /> </authorization> </system.web> </configuration>
Now you have to map the roles stored in the database to user accounts in each and every request so ASP.NET can determine whether the requestor is a manager or other( EX: S/w developer).
I hope this will help you .
HI.
click here to get your answer
这篇关于具有角色的表单身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文