Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I have to remove lines from web.config to upgrade to .net 4.0?

I started with an ASP.net 3.5 web application and upgraded to ASP.net 4.0. When I ran the application on my development workstation in the Visual Studio 2010 debugger, everything seemed to be good. However, when I pushed the application to my development web server, I kept getting error messages, which I resolved by commenting out some lines from the web.config in my previously working application:

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

Can someone explain to me why I had to do this to get my application to work on my development web server with .net 4.0?

like image 927
Vivian River Avatar asked Mar 16 '12 15:03

Vivian River


1 Answers

I've had to do this so many times! basically in .Net4 a lot of stuff was promoted to machine.config so is no longer needed in web.config

like image 59
Dave Becker Avatar answered Nov 16 '22 09:11

Dave Becker