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