locked
duplicate scriptmodule entry added to web.config periodically - MOSS 2007 RRS feed

  • Question

  • Occasionally my MOSS site starts to throw an error:

    The entry 'ScriptModule' has already been added. (C:\Inetpub\wwwroot\wss\VirtualDirectories\sitedir\web.config line 253)

    and I have to edit the web.config and delete a duplicate scriptmodule that the system has added - I can't figure out why it is being added.  I already have a scriptmodule entry, with version # 3.5.0.0, but the system adds one with version 1.0.61025)

    Below is the line the system adds, and below that is the one that I leave in there.

    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          
    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

    Any ideas why the system adds that additional entry, and how to stop it?  it seems to happen late at night (1-2 am), and I wake up to a bunch of support tickets.

    Thanks

    -JJ

    Wednesday, January 5, 2011 3:22 PM

Answers

  • Check your customization projects in visual studio,  if you are using AJAX or RAD Editor controls.In one of the project refers the old version and other refers the new version of System.Web.Extensions.So when you install the WSP one will add old script module and the other adds new one.

    Please make sure you have only one  System.Web.Extensions version reference in your projects.

    • Marked as answer by David HM Thursday, January 13, 2011 9:27 AM
    Sunday, January 9, 2011 6:02 PM

All replies

  • Hi,

    According to your description, I suggest that you can check this useful blog and thread, it is similar to your problem:
    http://jianwang.blogspot.com/2009/09/crm-isv-add-on-entry-scriptmodule-has.html
    http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/f02e65a6-52f9-4b7c-96a9-f27e1f482688
    I hope it can help you a little.

    Best regards,
    David Hu

     

    Friday, January 7, 2011 3:18 AM
  • Those don't help.  In the first link, the poster has a web.config for another application underneath his site, so he has a second web.config file in a directory underneath the site, and that other config file has the scriptmodule entry. 

    The second link is a similar issue.

    I've checked for config files in subdirectories and found one but it's value is 3.5.0.0. (it is in the _vti_bin virtual directory)  Plus, it isn't just that the system is reporting a duplicate entry that it is 'inheriting' from another config file, but instead the system is actually adding a second scriptModule entry to the web.config.

    Any other suggestions?

    Thanks

    Friday, January 7, 2011 10:08 PM
  • Check your customization projects in visual studio,  if you are using AJAX or RAD Editor controls.In one of the project refers the old version and other refers the new version of System.Web.Extensions.So when you install the WSP one will add old script module and the other adds new one.

    Please make sure you have only one  System.Web.Extensions version reference in your projects.

    • Marked as answer by David HM Thursday, January 13, 2011 9:27 AM
    Sunday, January 9, 2011 6:02 PM
  • I haven't solved this yet but am pretty close - someone pointed me to this post http://blog.thekid.me.uk/archive/2007/03/24/web-config-modification-manager-for-sharepoint.aspx with a tool someone wrote that enumerates all the web.config entries that SharePoint looks for - this tool lets you edit and delete those entries also.

    I haven't used this tool to fix my problem, but it did show me the component that 'owned' the web.config entry that is causing my problem, so I'm pursuing the vendor on the issue.  I may also use that code as a template to write a utility to update the offending entries.  The utility itself was a little buggy (I had to make some changes to get it to work properly) and so I don't trust using it to make the changes directly - but it was a great help in tracking down the cause.

    Thanks for the responses.

    -JJ

    Tuesday, January 18, 2011 2:36 PM
  • Pretty close presumably means I should not lock this thread yet. (?)

    Can you please post here again when you have finally solved it with some details.

     

    Moderator


    SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx
    WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
    Both also have links to extensive book lists and to (free) on-line chapters
    • Edited by Mike Walsh FIN Tuesday, January 18, 2011 2:50 PM not missed out now added in
    Tuesday, January 18, 2011 2:49 PM
  • Just wanted to advise that I never resolved this - We were preparing for our migration to sharepoint2010, so I wasn't able to devote any more time to this issue (we don't have the issue in the new environment) - but I'm confident that I was on track with deleting those entries.

    Thanks

    Wednesday, March 30, 2011 2:33 AM
  • Ok. Thanks.

    I'll take that as meaning the OP doesn't want to persue this so I'll lock the thread as completed to the OP's satisfaction.

    Moderator


    SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx
    WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
    Both also have links to extensive book lists and to (free) on-line chapters
    Wednesday, March 30, 2011 6:09 AM