ASP.NET窗体身份验证和“无身份验证”子文件夹

时间:2010-03-11 14:07:31

标签: .net asp.net authentication webforms forms-authentication

是否可以在表单身份验证的网站的子文件夹中禁用所有身份验证?你是如何做到这一点的?

2 个答案:

答案 0 :(得分:7)

是的,在子文件夹上放置一个web.config文件,其中包含以下内容:

<configuration>
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
</configuration>

答案 1 :(得分:4)

是的,您可以在web.config中使用location tag来配置文件夹级安全性。