web.config 权限设置

时间:2023-03-09 18:31:06
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>