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

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

问题描述

我正在创建现有生产站点的测试版本.站点内存在一个虚拟 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.

生产网络配置中没有明确"标签,站点和网络服务在两个独立的应用程序池中愉快地共存.

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?

谢谢吉姆

推荐答案

Web.config 继承即使在不同的 appPools 之间也会发生.如果您想停止这种行为,您应该将属性 enableConfigurationOverride="false" 添加到 applicationHost.config 文件中的 appPool(位于 %WINDIR%System32inetsrvConfig 和 %WINDIR%SysWOW64inetsrvconfig) 如下例所示:

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%System32inetsrvConfig and %WINDIR%SysWOW64inetsrvconfig) as in the following example:

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

马泰奥

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

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