web.config 上的特定页面安全性
我的 web.config 上有以下内容
<location path = "WebPages/Reports">
<system.web>
<authorization>
<deny roles="DeniedRole1, DeniedRole2"/>
<allow roles="AllowRole1,AllowRole2,AllowRole3"/>
</authorization>
</system.web>
</location>
<location path = "WebPages/Reports/SpecificPage.aspx">
<system.web>
<authorization>
<allow roles ="*"/>
</authorization>
</system.web>
</location>
基本上我想做的是让每个人都可以访问 SpecificPage.aspx,但对于 Reports 文件夹内的任何其他页面,它应该应用拒绝/允许规则。但是,这给了我以下错误:
Parser Error Message: Authorization rule names cannot contain the '*' character.
感谢任何帮助!
I have the following on my web.config
<location path = "WebPages/Reports">
<system.web>
<authorization>
<deny roles="DeniedRole1, DeniedRole2"/>
<allow roles="AllowRole1,AllowRole2,AllowRole3"/>
</authorization>
</system.web>
</location>
<location path = "WebPages/Reports/SpecificPage.aspx">
<system.web>
<authorization>
<allow roles ="*"/>
</authorization>
</system.web>
</location>
Basically what I'm trying to do is for everyone to have access to the SpecificPage.aspx, but for any other page inside the Reports folder it should apply the deny/allow rules. However, this is giving me the following error:
Parser Error Message: Authorization rule names cannot contain the '*' character.
Any help is appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
Try