Reputation: 1641
Browsing to the URL displays: "Http 500.19" internal server error.. There is a duplicate... 'system.web.extensions/scripting/scriptResourceHandler' section defined...."
Running the app from VS 2008 an "Unable to start debugging on the web server..." dialog is displayed.
Upvotes: 41
Views: 31421
Reputation: 2921
My issue was quite different and this will depend on what section is a duplicate.
For instance I had a duplicate loggingConfiguration section which appear to be the result of the parent and child app using different versions of Microsoft Enterprise Library
Upvotes: 1
Reputation: 86957
If you're using DotNetOpenAuth library in your website AND your website is a .NET 4.0 app
, then you need to make sure this line is NOT in your web.config
<section name="uri" type="System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
I installed DNOA using NuGet, and it automatically added that line into my web.config file. So I had to remove it.
BTW people, if you using the built in (hella-crappy) visual studio development server (aka Cassini) .. you will not get this problem/issue. It's only when u move your code over to IIS7 express or full IIS7 will this issue occur.
So delete that single line and then have a happy dance.
Upvotes: 7
Reputation: 11711
This MS troubleshooting might help also: http://support.microsoft.com/kb/942055
Upvotes: 1
Reputation: 1412
The solution is to change your machine.config.
Here the people from www.asp.net give a posible fix: http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes
Take a look :)
Upvotes: 3
Reputation: 31
In IIS 7 change the Application Pools setting for the appPool named "Classic .NET AppPool" to V2.0. Do this by right clicking the Classic .NET AppPool and selecting "Basic Settings..." then reset the .NET Framework Version to V2.0.xxxxx. Recycle the app pool and restart the web site and it should work fine.
Upvotes: 3
Reputation: 119806
It might be worth opening up the applicationHost.config
file:
C:\Windows\System32\inetsrv\config\applicationHost.config
Specifically, look for <location>
tags that match the site name (there can be multiple entries) and see if there's duplicate scriptResourceHandler
sections declared there. I'd also check the contents of <location path="">
as well.
Upvotes: 0
Reputation: 1641
In my case the default application pools was changed from Dot Net 2.0 to Dot Net 4.0. This changed the root machine.config to the 4.0 version. This version contains the "scriptResourceHandler" section as well as others. Thus the duplicate section warning.
Upvotes: 36