相关疑难解决方法(0)

禁用web.config继承?

我在我的网站的根目录中有一个内容管理应用程序,我正在尝试在子文件夹下使用不同的应用程序(计费应用程序).不幸的是,根网站的web.config干扰了子应用程序.

有没有办法只禁用子文件夹的web.config继承?

更新:Stephen Burris链接,使用<location>标记可以阻止部分Web配置的继承,如下所示:

<?xml version="1.0"?>
<configuration>
<configSections>
    ....
</configSections>
<location path="." inheritInChildApplications="false">
    <appSettings>
        ....
    </appSettings>
    <connectionStrings/>
    <system.web>
        ....
    </system.web>
    <system.codedom>
        ....
    </system.codedom>
    <system.webServer>
        ....
    </system.webServer>
</location>
<runtime>
    ....
</runtime>
</configuration>
Run Code Online (Sandbox Code Playgroud)

<configSections><runtime>部分将不接受被封装在标签...所以我想这不仅会大部分的工作.谁知道怎么做得更好?

asp.net

35
推荐指数
4
解决办法
3万
查看次数

标签 统计

asp.net ×1