Pages

Thursday, September 22, 2011

There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined

Last time I got the following error:
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.
See in the image below the following config error, and also watch the config source.
There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
Root of the error
I got the error when I was deploying a web application precompiled in asp.net 2.0 onto the production server with asp.net 4.0. The simple search reveals that it is known issues with VS 2010 and asp.net 2.0. But my site is asp.net 2.0 enabled. What's the root of the error then?  
My conclusion (and please correct me if necessary) I have configured asp.net web extension namespaces in my web.config file. You don't see this in asp.net 3.5 and 4.0 enabled sites since servers with asp,net 3.5/4.0 by default server asp.net ajax services. But asp.net 2.0 has to be ajax enabled by installing asp.net ajax extension 1.0 which you can download from here. Sensed duplicate entry of system.web.extension section group? Yes, don't include the following section group in the config section if your site runs on asp.net 2.0 but published on asp.net 3.5/4.0.
    

    
      
        
Comment out the config section (or remove it if you like), and you are done. Good luck! kick it on DotNetKicks.com

12 comments:

  1. Many Thanks. It helped a lot

    ReplyDelete
  2. I have built my site in asp.net 3.5 and also have the same error when deploying it.
    I could't find duplicate's.

    ReplyDelete
  3. my errors-
    Error Code 0x800700b7
    Config Error There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined


    15:
    16:

    ReplyDelete
  4. web.config file...

    ReplyDelete
  5. my config file-

    ReplyDelete
  6. Wilson ContrerasSat Mar 24, 02:46:00 AM

    Thanks a lot, removing .. solved my problem.

    ReplyDelete
  7. thanks. that made my day...

    ReplyDelete
  8. Just change the target framework of project to .NetFramework4.
    Recompile and Publish it. Problem will be resolved.

    ReplyDelete
  9. Thanks for the post!

    I got the above error after installing a v4.0 website on my box (they had all been v2.0 before that.)

    When I installed the v4.0 site originally, I received the message in the link below, and took the recommended steps in the discussion to fix it:

    http://social.msdn.microsoft.com/Forums/eu/wcf/thread/39571e42-aca7-469d-8c68-aa59c2da4fcc

    ..after following the instructions and running aspnet_regiis -iru, my v2.0 site stopped working. That's because its AppPool in IIS had been set to v4.0 during the original fix. Setting that AppPool back to v2.0 fixed the problem.

    ReplyDelete
  10. Worked for me!

    ReplyDelete
  11. Simply switch the application pool.

    ReplyDelete
  12. Worked for me in Window 8 with IIS 8.0. Many thanks for saving me lots of time!

    ReplyDelete

Hope you liked this post. You can leave your message or you can put your valuable suggestions on this post here. Thanks for the sharing and cooperation!