0

I have a server that is running an ASP.NET 2.0 Web Forms website and I would like to manually upgrade this to ASP.Net 4.0. What are the steps I'll need to take? I'm not using any ASP.NET 4.0 features yet in the site, but I may be in the future so I just want to have the website ready. Note: The server does not have Visual Studio installed so I cannot do an auto conversion through the wizard and installing Visual Studio, or copying the site to another machine to convert the project to .NET 4 is an option I would like to avoid.

In comparing a .NET 4 and .NET web.config, I've noticed some difference such as the TargetFramework="4.0" property; but I'm wondering what else is involved in a manual migration?

I'm not as familiar with all the properties and values in a web.config as I would like to be, and as such I don't want to play around in the file and potentially break or hinder something else.

Kev
  • 118,037
  • 53
  • 300
  • 385
Daniel
  • 56
  • 6
  • 1
    You should check this (answered) post : http://stackoverflow.com/a/3796881/375304 – Superzadeh Sep 25 '13 at 14:47
  • Checked this out, but it doesn't get into the details regarding manually updating from 2 to 4, more so what to watch out for in your validation after doing so; it looks like the person asking the question used the VS conversion wizard to update. – Daniel Sep 25 '13 at 18:06

1 Answers1

2

One thing to watch out for is the following in your web.config file:

<configSections>
  <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
    <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
      <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
        <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
        <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
        <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
      </sectionGroup>
    </sectionGroup>
  </sectionGroup>
</configSections>  

Those config sections are now present in your machine.config file. If they exist in your app's web.config file and you don't remove them, you'll encounter a 500.19 Internal Server Error.

Kev
  • 118,037
  • 53
  • 300
  • 385