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

ASP.NET中禁止继承IIS中web.config根目录的配置

时间:2015-07-15 22:21:53      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:

异常信息:

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

 

Parser Error Message: The entry ‘XXXXX‘ has already been added.

 

此错误一般是访问虚拟目录时抛出的异常 导致此异常的原因是因为虚拟目录中项目默认继承了主站的配置文件出现配置冲突

解决方案:在主站配置文件中禁止继承允许重写

  <configuration>

<configSections> </configSections>

      <location path="." allowOverride="true" inheritInChildApplications="false">

        <system.web>

          <httpModules></httpModules>

      </system.web>

    </location>

  </configuration>

ASP.NET中禁止继承IIS中web.config根目录的配置

标签:

原文地址:http://www.cnblogs.com/huaguduo/p/4649510.html

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