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

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


6 responses to “The configuration section ‘system.web.extensions’ cannot be read because it is missing a section declaration.”

  1. Elmar Avatar
    Elmar

    Solution worked for me. Thank you for the clear Information.

  2. Hilal Avatar

    thanks it work

  3. Bill Avatar
    Bill

    Thanks you!

  4. Kris Labarda Avatar
    Kris Labarda

    Thank you. This work after Windows update

  5. Shantilal Suthar Avatar

    I tried above steps and its already updated as needed but still not working.

  6. Ruena Vas Avatar

    Thanks for the information. Helped me solve the error…

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.