IIS如何避免子web应用程序中继承根目录web.config配置


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>

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM