I am migrating a web application (WebForms) from ASP.NET 3.5 on IIS6 to ASP.NET 4.0 on IIS 7.5.
I created a new project in VS2010 and add the existing source files from the old project and compiled. It took a small amount of tweaking but everything compiled fine.
When I run the application via IIS (http://localhost/myapp) I get the following error:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
The relevant part of the Web.config is:
<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">
...
The error is highlighting the script ResourceHandler
I have done some Googling but cannot find a solution to this problem. Any ideas?