Have you seen this error with a Visual Studio 2010 ASP.NET or Silverlight project? 

The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration.

You can see this image below for clearly:



You can also get this error when you go to the Internet Information Services (IIS) Manager for IIS7 when you click on the application directory.



It’s because you’ve deployed your application on to an IIS Server where the application’s AppPool is set to run under the DefaultAppPool.  DefaultAppPool is automatically configured to run under .NET 2.0 rather than .NET 4.0.  This means that the System.Web.Extensions stuff is unavailable to that version of the .NET Framework.

Here’s what the Application Pools configuration looks like in IIS Manager.



To change the Application Pool (AppPool) settings for your web application

1. Select the application directory
2. Under Actions, click Basic Settings…



Your application pool is probably set to DefaultAppPool.



3. Change the Application Pool to ASP.NET v4.0 (or another .NET 4.0 app pool) by clicking on the Select… button.



4. Then, click OK.

5. Please try to run it again and it should work.