Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Advice on moving towards .NET 4.0+

Advice on moving towards .NET 4.0+

Scheduled Pinned Locked Moved ASP.NET
sysadminhelpquestioncsharp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Danpeking
    wrote on last edited by
    #1

    Hi, we have around 15 .NET 2.0 and .NET 3.5 applications and I've created a new .NET 4.0 app. I would like to put this with the others on our new web server however when deploying I get an error about duplicate entries in the web.config. I think it specifically relates to tags like System.Web.Extensions and clashes with the machine.config on the server. If I remove these tags then I'm sure the error will go away. My question is...what's the best approach here? Surely removing these tags every time I deploy is not the solution. Should I upgrade all the applications to .NET 4.0? If so, what then? Would I simply remove the duplicate entries from the machine.config rather than the web.config for each deployment? Can somebody please advise on the best solution moving forward for this problem? Thank you!

    Richard DeemingR J 2 Replies Last reply
    0
    • D Danpeking

      Hi, we have around 15 .NET 2.0 and .NET 3.5 applications and I've created a new .NET 4.0 app. I would like to put this with the others on our new web server however when deploying I get an error about duplicate entries in the web.config. I think it specifically relates to tags like System.Web.Extensions and clashes with the machine.config on the server. If I remove these tags then I'm sure the error will go away. My question is...what's the best approach here? Surely removing these tags every time I deploy is not the solution. Should I upgrade all the applications to .NET 4.0? If so, what then? Would I simply remove the duplicate entries from the machine.config rather than the web.config for each deployment? Can somebody please advise on the best solution moving forward for this problem? Thank you!

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      Make sure each application is assigned to an application pool with the appropriate .NET Framework version selected. The 4.0 application should have 4.0 selected; the 2.0 and 3.5 applications should have 2.0 selected. If your hosting all of the applications in the same site, then you'll need to make some changes to the web.config file: Changing ASP.NET web.config inheritance when mixing versions of child applications[^] In particular, you'll need to wrap various sections in the parent application's web.config file in <location> tags:

      <location path="" inheritInChildApplications="false">
      ...
      </location>

      Try to avoid touching the machine-level config files - you never know whether an update will overwrite your changes.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      D 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        Make sure each application is assigned to an application pool with the appropriate .NET Framework version selected. The 4.0 application should have 4.0 selected; the 2.0 and 3.5 applications should have 2.0 selected. If your hosting all of the applications in the same site, then you'll need to make some changes to the web.config file: Changing ASP.NET web.config inheritance when mixing versions of child applications[^] In particular, you'll need to wrap various sections in the parent application's web.config file in <location> tags:

        <location path="" inheritInChildApplications="false">
        ...
        </location>

        Try to avoid touching the machine-level config files - you never know whether an update will overwrite your changes.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        D Offline
        D Offline
        Danpeking
        wrote on last edited by
        #3

        That's great, thanks very much!

        1 Reply Last reply
        0
        • D Danpeking

          Hi, we have around 15 .NET 2.0 and .NET 3.5 applications and I've created a new .NET 4.0 app. I would like to put this with the others on our new web server however when deploying I get an error about duplicate entries in the web.config. I think it specifically relates to tags like System.Web.Extensions and clashes with the machine.config on the server. If I remove these tags then I'm sure the error will go away. My question is...what's the best approach here? Surely removing these tags every time I deploy is not the solution. Should I upgrade all the applications to .NET 4.0? If so, what then? Would I simply remove the duplicate entries from the machine.config rather than the web.config for each deployment? Can somebody please advise on the best solution moving forward for this problem? Thank you!

          J Offline
          J Offline
          jkirkerx
          wrote on last edited by
          #4

          In my opinion, I would migrate the older apps to 4.0 It's really not that bad, I did 20 apps in a short amount of time. the smtp.mailclient had the biggest change, and was just a couple of lines of code. Do a test one, create a new folder, copy the project into it, and see what happens.

          D 1 Reply Last reply
          0
          • J jkirkerx

            In my opinion, I would migrate the older apps to 4.0 It's really not that bad, I did 20 apps in a short amount of time. the smtp.mailclient had the biggest change, and was just a couple of lines of code. Do a test one, create a new folder, copy the project into it, and see what happens.

            D Offline
            D Offline
            Danpeking
            wrote on last edited by
            #5

            Will have a go, thanks!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups