web.config error - Umbraco 4.5.2 - ASP.NET 4.0 - IIS7
I have recently upgraded my virtual server from Win2k3 with IIS6 & .NET 3.5 installed to Win2k8 with IIS7 & .NET 4.0 installed. I moved my current Umbraco 4.5 websites (still using a web.config for .NET 3.5). No problems occurred.
Of course, I want to use the latest Umbraco build (4.5.2) with .NET 4.0 for new websites, but I can't get rid of the following web.config error in IIS7 (using ".NET Compilation") :
"Cannot add duplicate collection entry of type 'add' with unique key attribute 'assembly' set to 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089'."
I never use the DefaultApplicationPool. I have created a "Umbraco .NET 4" application pool, with "Integrated" managed pipeline mode, using ".NET Framework v4.0.30319", and identity "NetworkService" (that has read/write permissions on the folders of my Umbraco website).
I think I found the issue : the "System.Core", "System.Web.Extensions", "System.Xml.Linq" & "System.Data.DataSetExtensions" assemblies were already present in the machine-level web.config file (situated at %WinDir%/Framework.NET/Framework64/v4.0.30319/Config/web.config) and, apparently, the machine-level web.config is loaded by default in each .NET 4.0 application.
It still makes me wonder however why Umbraco spreads a web.config file for .NET 4.0 that contains lines which result in duplicate entries... :S
Of course, these are operations I really didn't want to figure out myself. I'd rather have Umbraco providing me with a 100% valid web.config file to start with...
Is there a possibility to post a web.config for my configuration?
- Windows server 2008 Datacenter edition Service Pack 2 - IIS version 7.0.6000.16386 - ASP.NET Framework v4.0.30319 (64-bit)
First, I commented out all the ASP.NET 4.0 Assemblies in the umbraco web.config. Then, I went into IIS7 Manager > Umbraco Site > .NET Compilation > Assemblies > Removed the assemblies that were already in the umbraco web.config and applied changes. The changes were automatically made in the code as you can see below. All I had to do was uncomment the ASP.NET 4.0 Assemblies that were previousily commented out. Works like a charm!
web.config error - Umbraco 4.5.2 - ASP.NET 4.0 - IIS7
I have recently upgraded my virtual server from Win2k3 with IIS6 & .NET 3.5 installed to Win2k8 with IIS7 & .NET 4.0 installed.
I moved my current Umbraco 4.5 websites (still using a web.config for .NET 3.5). No problems occurred.
Of course, I want to use the latest Umbraco build (4.5.2) with .NET 4.0 for new websites, but I can't get rid of the following web.config error in IIS7 (using ".NET Compilation") :
"Cannot add duplicate collection entry of type 'add' with unique key attribute 'assembly' set to 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089'."
I never use the DefaultApplicationPool. I have created a "Umbraco .NET 4" application pool, with "Integrated" managed pipeline mode, using ".NET Framework v4.0.30319", and identity "NetworkService" (that has read/write permissions on the folders of my Umbraco website).
Anyone to the rescue?
Hey,
Looks like you've got a duplicate line in your web.config around here
Rich
<compilation defaultLanguage="c#" debug="false" batch="false" targetFramework="4.0">
<assemblies>
<!-- ASP.NET 4.0 Assemblies -->
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</assemblies>
</compilation>
No duplicate line. All the assemblies (in this particular web.config) are unique...
I think I found the issue : the "System.Core", "System.Web.Extensions", "System.Xml.Linq" & "System.Data.DataSetExtensions" assemblies were already present in the machine-level web.config file (situated at %WinDir%/Framework.NET/Framework64/v4.0.30319/Config/web.config) and, apparently, the machine-level web.config is loaded by default in each .NET 4.0 application.
It still makes me wonder however why Umbraco spreads a web.config file for .NET 4.0 that contains lines which result in duplicate entries... :S
Additionally, I noticed the following error in Helicon APE manager :
The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration
As it turned out, I needed to to delete the following section from my web.config :
<!-- ASPNETAJAX -->
<system.web.extensions>
<scripting>
<scriptResourceHandler enableCompression="true" enableCaching="true" />
</scripting>
</system.web.extensions>
Of course, these are operations I really didn't want to figure out myself. I'd rather have Umbraco providing me with a 100% valid web.config file to start with...
Is there a possibility to post a web.config for my configuration?
- Windows server 2008 Datacenter edition Service Pack 2
- IIS version 7.0.6000.16386
- ASP.NET Framework v4.0.30319 (64-bit)
First, I commented out all the ASP.NET 4.0 Assemblies in the umbraco web.config. Then, I went into IIS7 Manager > Umbraco Site > .NET Compilation > Assemblies > Removed the assemblies that were already in the umbraco web.config and applied changes. The changes were automatically made in the code as you can see below. All I had to do was uncomment the ASP.NET 4.0 Assemblies that were previousily commented out. Works like a charm!
is working on a reply...