开发者

Specific page security on web.config

开发者 https://www.devze.com 2023-01-17 06:27 出处:网络
I have the following on my web.config <location path = \"WebPages/Reports\"> <system.web> <authorization>

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 th开发者_JAVA百科e following error:

Parser Error Message: Authorization rule names cannot contain the '*' character.

Any help is appreciated!


Try

<location path = "WebPages/Reports/SpecificPage.aspx">
    <system.web>
        <authorization>
            <allow users="*"/>
        </authorization>
    </system.web>
</location>
0

精彩评论

暂无评论...
验证码 换一张
取 消