0
我使用这个代码在web.config中限制特定文件夹中的角色与web.config中
<authentication mode="Forms">
<forms timeout="2000" name="A" loginUrl="login.aspx" protection="None" path="/"></forms>
</authentication>
认证和每个文件夹中使用的web.config
<?xml version="1.0"?>
<configuration>
<system.web>
<authorization>
<allow roles="Admin"/> // or other roles in different pages
</authorization>
</system.web>
</configuration>
当用户不Admin Role
想要打开此页面,自动重定向到“login.aspx”
是否有可能重定向到其他页面,如“access-denied.aspx”
谢谢Praneeth,但我想处理这个问题,不使用代码, – Mironline 2012-03-25 17:28:27