<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" />
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" /> <!--指定身份验证方式-->
<authorization><!--配置整个网站的访问权限-->
<allow users="*"/>
</authorization>
<customErrors mode="On" defaultRedirect="Error.aspx"> <!--页面出现错误时redirect到的页面-->
<error statusCode="403" redirect="NoAccess.aspx" />
<error statusCode="404" redirect="FileNotFound.aspx" />
</customErrors>
</system.web>
<location path="Default.aspx"><!--限制页面的访问权限-->
<system.web>
<authorization>
<deny users="*"/>
</authorization>
</system.web>
</location>
<location path="aa"> <!--限制文件夹的访问权限-->
<system.web>
<authorization>
<deny users="*"/>
</authorization>
</system.web>
</location>
![](https://img2024.cnblogs.com/blog/35695/202408/35695-20240826070647288-243310440.jpg)