web.config 权限设置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了web.config 权限设置相关的知识,希望对你有一定的参考价值。

技术分享
<system.web>
    <authorization>
                <!--未登陆用户不可以访问-->
        <deny users="?" />
    </authorization>
    <urlMappings enabled="true">
                <!--防止访问目录必须登陆-->
        <add url="~/" mappedUrl="~/Default.aspx" />
    </urlMappings>
</system.web>
<location path="dir">
    <system.web>
        <authorization>
            <allow users="*" />
        </authorization>
    </system.web>
</location>
<location path="path">
    <system.web>
        <authorization>
            <allow users="*" />
        </authorization>
    </system.web>
</location>            
View Code

 

以上是关于web.config 权限设置的主要内容,如果未能解决你的问题,请参考以下文章