Here’s a trap if you’re setting up an existing web application on a new IIS 7.5 installation …

If your web application fails on startup with this error:

The requested page cannot be accessed because the related configuration data for the page is invalid. There is a duplicate ‘system.web.extensions/scripting/scriptResourceHandler’ section defined

The likely cause is that you are trying to run a web application written to run on the .NET 2.0 runtime on the .NET 4.0 runtime.

There are three solutions.

Solution #1: Upgrade

Modify your web.config to remove those sections now specified by default, and retest your application to ensure it works properly on .NET 4.0

Solution #2: Reconfigure the Default Application pool

Change the runtime specified for DefaultAppPool to use .NET 2.0 instead.

Note that this will impact on any other web applications you’re also running in the default application pool. This is likely to be fine in a development environment, but contraindicated in production.

Solution #3: Move the Web Application to another Application Pool

Instead of modifying the default application pool, change the configuration of the web application to reference a different application pool, one configured to use the .NET 2.0 runtime.

You may need to add a suitable application pool if none exists.

Comments

blog comments powered by Disqus
Next Post
Tab ordering in Visual Studio  14 Mar 2011
Prior Post
On the length of names ...  21 Feb 2011
Related Posts
Using Constructors  27 Feb 2023
An Inconvenient API  18 Feb 2023
Method Archetypes  11 Sep 2022
A bash puzzle, solved  02 Jul 2022
A bash puzzle  25 Jun 2022
Improve your troubleshooting by aggregating errors  11 Jun 2022
Improve your troubleshooting by wrapping errors  28 May 2022
Keep your promises  14 May 2022
When are you done?  18 Apr 2022
Fixing GitHub Authentication  28 Nov 2021
Archives
March 2011
2011