相关疑难解决方法(0)

使用inheritInChildApplications避免子Web应用程序中的web.config继承

我想补充一下

<location inheritInChildApplications="false">
Run Code Online (Sandbox Code Playgroud)

到我的父Web应用程序的web.config但它似乎没有工作.

我的父母web.config有:

<configuration>
    <configSections>
    </configSections>

    // 10 or so custom config sections like log4net, hibernate,

    <connectionStrings>
    </connectionStrings>

    <appSettings>
    </appSettings>

    <system.diagnostics>
    </system.diagnostics>

    <system.web>
         <webParts>
         </webParts>
         <membership>
         </membership>

         <compilation>
         </compilation>
    </system.web>

    <location ..>
    <system.web>
        </system.web>
    </location>

    <system.webServer>
    </system.webServer>
Run Code Online (Sandbox Code Playgroud)

我的子Web应用程序在IIS中设置为应用程序,并且继承了web.config导致问题的父级应用程序.

我应该在哪里放置

<location inheritInChildApplications="false">
Run Code Online (Sandbox Code Playgroud)

所以它忽略了所有各种web.config设置?

asp.net configuration iis-7 web-config

148
推荐指数
5
解决办法
18万
查看次数

标签 统计

asp.net ×1

configuration ×1

iis-7 ×1

web-config ×1