Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kurisotofa 27 posts 75 karma points
    Dec 06, 2010 @ 23:34
    Kurisotofa
    0

    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?

  • Rich Green 2246 posts 4008 karma points
    Dec 06, 2010 @ 23:53
    Rich Green
    1

    Hey,

    Looks like you've got a duplicate line in your web.config around here

     <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>

    Rich

  • Kurisotofa 27 posts 75 karma points
    Dec 07, 2010 @ 08:19
    Kurisotofa
    0

        <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...

  • Kurisotofa 27 posts 75 karma points
    Dec 11, 2010 @ 13:49
    Kurisotofa
    0

    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

  • Kurisotofa 27 posts 75 karma points
    Dec 11, 2010 @ 14:50
    Kurisotofa
    0

    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)

  • Bruno 30 posts 50 karma points
    Feb 01, 2011 @ 18:54
    Bruno
    0

    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!

      <assemblies>
      <clear />
      <!-- IIS7 Extensions -->
      <add assembly="mscorlib" />
      <add assembly="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      <add assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <add assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      <add assembly="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      <add assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <add assembly="System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <add assembly="System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      <add assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      <add assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      <add assembly="System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add assembly="System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add assembly="System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add assembly="System.WorkflowServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add assembly="System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add assembly="System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add assembly="*" />
      <add assembly="System.Web.WebPages.Deployment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            <!-- 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>

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies