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.
I’ve been wrestling with it for the last hour and I just found the answer.
In a web browser, it appears as an HTTP Error 500.19 – Internal Server Error:
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.
The fix comes from Leo Tang at Microsoft on this forum post.
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. Click OK
Re-run your application and it should work.
I hope this helps.