我需要将我的用户重定向到AuthError.aspx页面("您无权访问此页面"),如果他们经过身份验证但尝试访问他们无法访问的页面(因为考试的角色) .如果我设置了web.config,那么:
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>
Run Code Online (Sandbox Code Playgroud)
这是系统的错误行为,因为用户已经过身份验证,无需将他或她重定向到此页面.但是,如果我在这里写AuthError.aspx而不是Login.aspx我怎么能将尚未验证的用户重定向到登录页面?