“条目已被添加"; -两个独立的应用程序池 [英] "Entry has already been added" - Two Separate App Pools

查看:62
本文介绍了“条目已被添加"; -两个独立的应用程序池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建现有生产站点的测试版本.该站点内部存在一个虚拟Web服务应用程序-两个Web配置具有相同的连接字符串.

I am creating a test version of an existing production site. A virtual web service application exists inside the site - and the two web configs have the same connection string.

生产Web配置中没有清除"标签,并且站点和Web服务在两个单独的应用程序池中愉快地共存.

There are no "clear" tags in the production web configs and the site and the web service co-exist merrily on two separate app pools.

但是,在测试站点上,每次浏览到Web服务URL时,都会收到配置错误已添加条目'ConnectionString'."

On the test site however, every time I browse to the webservice URL I receive the Configuration Error "The entry 'ConnectionString' has already been added."

测试站点和相应的虚拟应用程序使用它们自己的独立应用程序池.有什么想法吗?

The test site and corresponding virtual application use their own separate app pools. Any ideas?

谢谢 吉姆

推荐答案

即使在不同的appPool之间,Web.config继承也会发生. 如果要停止此行为,则应按如下所示将属性enableConfigurationOverride="false"添加到applicationHost.config文件(位于%WINDIR%\ System32 \ inetsrv \ Config和%WINDIR%\ SysWOW64 \ inetsrv \ config)中的appPool中以下示例:

Web.config inheritance happens even between different appPools. If you want to stop this behavior, you should add the attribute enableConfigurationOverride="false" to your appPool in the applicationHost.config file (located in %WINDIR%\System32\inetsrv\Config and %WINDIR%\SysWOW64\inetsrv\config) as in the following example:

<add name="MyAppPool" autoStart="true" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" enableConfigurationOverride="false">
    <processModel identityType="NetworkService" />
</add>

Matteo

这篇关于“条目已被添加"; -两个独立的应用程序池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆