Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Entry has already been added" - Two Separate App Pools

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.

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?

Thanks Jim

like image 710
Spodgy Avatar asked Apr 29 '14 14:04

Spodgy


1 Answers

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

like image 150
Matteo Sganzetta Avatar answered Sep 30 '22 19:09

Matteo Sganzetta