我在我的网站的根目录中有一个内容管理应用程序,我正在尝试在子文件夹下使用不同的应用程序(计费应用程序).不幸的是,根网站的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 ×1