权限控制方面:1.在每个页面的pageload中使用以下语句验证:
if (!this.User.Identity.IsAuthenticated || !User.IsInRole("seller"))
{
FormsAuthentication.RedirectToLoginPage();
return;
}还是在web.config中使用:
<authorization>
<allow users="allowusers"
roles="allowroles" />
<deny users="noallowuser"
roles="noallowrole" />
</authorization>或是其它的好方法?
if (!this.User.Identity.IsAuthenticated || !User.IsInRole("seller"))
{
FormsAuthentication.RedirectToLoginPage();
return;
}还是在web.config中使用:
<authorization>
<allow users="allowusers"
roles="allowroles" />
<deny users="noallowuser"
roles="noallowrole" />
</authorization>或是其它的好方法?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货