The section or group name 'cachingConfiguration' is already defined, but where?

On Windows XP I am working on a .NET 3.5 web application that combines WebForms and MVC2 (parts of WebForms are deprecated and carried over to MVC). When I run this from VS2008 using ASP.NET webserver everything works as expected.

However, when I host the application in IIS and try to use it, I see the following error

Section or group name 'cachingConfiguration' is already defined.
Updates to this may only occur at the configuration level where it is defined.

Source Error: 
Line 24: </sectionGroup>
Line 25: <section name = "log4net" type = "log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
Line 26: <section name = "cachingConfiguration" type = "Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version = 4.1.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35" />
Line 27: </configSections>
Line 28: 

Of course, if I remove the offending line (line 26 in the error message) from my web.config, the application works correctly.

However, I really need to figure out where this duplicate definition is. This is nowhere in my solution. Where else could it be?

Edit

Additional Information:

This is the only app I'm working on, instead of adding the virtual directory to IIS, I just hired the default local website path to point to my site.

+2


a source to share


1 answer


You can check the file machine.config

as all settings from it are inherited by your web application. In asp.net 4.0 a lot of things have been moved there to reduce complexity web.config file

. The path to it is x:\$Windows$\Microsoft.NET\Framework\$version$\config\machine.config

, where x:\$Windows$

is the directory where Windows is installed on your computer and $version$

is your version of the .Net framework.



+1


a source







All Articles