首页 > Web开发 > 详细

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

时间:2015-07-15 22:20:06      阅读:313      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!