在Web.config文件中使用<location>元素可以在同一个配置文件中指定多个设定组,使用<location>元素的path属性可以指定设定应该被应用到子目录或文件。

   例如,下面的web.config文件就使用了<location>元素创建了两组设置---一组是当前目录,而另一组仅仅应用于子目录Secure中的文件。

<configuration>
      <system.web>
              <!-- Basic configuration settings go here. -->
      </system.web>
      <location path="/Secure">
             <system.web>
                  <!-- Configuration settings for the Secure subdirectory go here. -->
             </system.web>
     </location>
</configuration>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
  • 2021-10-13
猜你喜欢
  • 2022-01-29
  • 2021-07-15
  • 2021-09-03
  • 2022-03-11
  • 2021-12-27
  • 2022-01-05
相关资源
相似解决方案