« Previous Next »

Thread: Problem with Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'ScriptHandlerFactory'

Last post 07-03-2009 3:42 AM by Leo Tang - MSFT. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 06-30-2009, 12:47 AM

    Problem with Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'ScriptHandlerFactory'

    Hi, my name is Arif,

    I've tried to deploy the website in windows server 2008 (IIS 7.0). However, it does not work successfully. I developed the website using windows xp and I also have tried to published in windows xp and it works great.

    For that projects, I use AJAX. in windows server 2008(IIS 7.0) I am sure that I have installed ajax extension which is the same version that i have installed in my local machine ( windows xp).

    Here is the error details that I've got, any idea how to solve this error?

    HTTP Error 500.19 - Internal Server Error

    The requested page cannot be accessed because the related configuration data for the page is invalid.

    Detailed Error Information
    Module IIS Web Core
    Notification BeginRequest
    Handler Not yet determined
    Error Code 0x800700b7
    Config Error Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'ScriptHandlerFactory'
    Config File \\?\C:\inetpub\wwwroot\arif\arif\web.config
    Requested URL http://localhost:80/arif/arif/index.htm
    Physical Path C:\inetpub\wwwroot\arif\arif\index.htm
    Logon Method Not yet determined
    Logon User Not yet determined
    Config Source
      142:         
    143: <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
    144: type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  • 07-03-2009, 3:42 AM In reply to

    Re: Problem with Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'ScriptHandlerFactory'

    Hi,

    As the error message indicates , there are duplicate collection entry. You can try add the following section at the beginning of the handler section:
    <remove name="ScriptHandlerFactory">

    The website will inherits the settings form parent level . This should be the reason of this issue. You can check if there is a web.fig file in the parent web content folder(e.g. C:\inetpub\wwwroot\arif\ or C:\inetpub\wwwroot ) and an duplicate collection entry in it.

    Leo Tang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Page 1 of 1 (2 items)