码迷,mamicode.com
首页 > Web开发 > 详细

IIS如何让子web应用程序中继承根目录web.config

时间:2018-10-09 21:45:42      阅读:288      评论:0      收藏:0      [点我收藏+]

标签:DApp   内容   start   add   pat   属性   over   继承   col   

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

标签:DApp   内容   start   add   pat   属性   over   继承   col   

原文地址:https://www.cnblogs.com/pengwen135/p/9762713.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!