zoukankan      html  css  js  c++  java
  • 关闭web.config的继承

    web.config默认是有继承关系的,一个站点的主应用(根目录)的web.config,默认情况下会影响到该站点下的虚拟目录和子应用程序。

    关闭web.config方法很简单,在根目录的web.config文件中,把不希望配置的内容放到如:<location path="." allowOverride="false" inheritInChildApplications="false"></location>标签中即可。可以包裹一个模块,也可以是多个模块。

    <location path="." allowOverride="false" inheritInChildApplications="false">
      <system.web.webPages.razor>
        ...
      </system.web.webPages.razor>
      <system.webServer>
        ...
      </system.webServer>
      <system.web>
        ...
      </system.web>
    </location>
      

    标签的几个属性相对简单,allowOverride是否允许覆盖,另一个inheritInChildApplications(vs编辑web.config时可能提示不存在,不用管他,因为在MSDN中是支持此属性的)是关键属性,他表示是配置内容否集成到子应用中。

  • 相关阅读:
    CodeForces 1017B
    POJ 1323-Game Prediction(贪心)
    CodeForces 104B-Testing Pants for Sadness(思维题)
    CodeForces 1324D
    UVA 1152-4 Values whose Sum is 0(二分查找)
    POJ 1700-Crossing River(贪心)
    HDU 1789-Doing Homework again(并查集+贪心)
    SDUT 1298-活动选择(贪心)
    HDU 1272-小希的迷宫(带环并查集)
    CodeForces
  • 原文地址:https://www.cnblogs.com/zhangpengshou/p/3094897.html
Copyright © 2011-2022 走看看