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.
A . config file contains XML that has a configuration element as the root node. Information inside this element is grouped into two main areas: the configuration section-handler declaration area, and the configuration section settings area.
Yes you can have two web. config files in application. There are situations where your application is divided in to modules and for every module you need separate configuration. For example if you have a application which has two modules lets say accounts and sales.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With