1、一种方式,需要改动根目录的web.config(不是很推荐)
<?xml version="1.0"?><configuration> <location path="." inheritInChildApplications="false"> ?<!-- Stuff that shouldn‘t be inherited goes in here --> </location></configuration>
2、直接创建一个新的应用程序并编辑 applicationHost.config 文件( 位于 C:\Windows\System32\inetsrv\config下).
找到对应的应用池相关内容加上enableConfigurationOverride="false"属性即可避免继承。
<add name="应用池名称" autoStart="true" ?enableConfigurationOverride="false"></add>
IIS如何让子web应用程序中继承根目录web.config
原文地址:https://www.cnblogs.com/pengwen135/p/9762713.html