Azure DevOps, Scrum, & .NET Software Leadership and Consulting Services

Introducing Slide Speaker: Videos with Voice-over from your PowerPoint and Google Slides Presentations

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


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:

image

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.

image

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.

image

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

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

image 

Your application pool is probably set to DefaultAppPool.

image

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

image

4. Click OK

Re-run your application and it should work.

I hope this helps.

-Ben

SUBSCRIBE TO THE BLOG

,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.