当我在 web.config 中添加以下代码以防止未经授权的用户访问 ASP.NET Web 应用程序时:
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
在加载Login.aspx表单时,我遇到了以下错误:
在Internet Explorer 11中:
JavaScript严重错误,位于http://localhost
:2968/Account/Login.aspx?ReturnUrl=/bundles/WebFormsJs?v=q9E9g87bUDaS624mcBuZsBaM8xn2E5zd-f4FCdIk2cA1&v=q9E9g87bUDaS624mcBuZsBaM8xn2E5zd-f4FCdIk2cA1的第2行,第1列
SCRIPT1002: 语法错误
在Google Chrome中:
Uncaught SyntaxError: Unexpected token <
http://localhost
:2968/Account/Login.aspx?ReturnUrl=%2fbundles%2fWebFormsJs%3fv%3dq9E9g87bUDaS624mcBuZsBaM8xn2E5zd-f4FCdIk2cA1&v=q9E9g87bUDaS624mcBuZsBaM8xn2E5zd-f4FCdIk2cA1