Parser Error Message: The entry 'ScriptModule' has already been added.

Last post 05-26-2009 9:47 PM by todd.liu. 13 replies.

Sort Posts:

  • Parser Error Message: The entry 'ScriptModule' has already been added.

    02-11-2007, 5:22 PM
    • Member
      point Member
    • Verdox
    • Member since 02-11-2007, 10:17 PM
    • Posts 1

    On my development system everything is running fine, when i publish to my beta server (SBS 2003 - *no* VS installed) I get the following error:

    Parser Error Message: The entry 'ScriptModule' has already been added.

    Removing this line resolves the issue but then presents me with various errors relating to not being able to load System.Web.Extensions... If i can understand why the first issue is occuring this would help! Any clues?

  • Re: Parser Error Message: The entry 'ScriptModule' has already been added.

    02-13-2007, 2:35 PM
    • Member
      214 point Member
    • fizzystutter
    • Member since 11-15-2006, 6:08 PM
    • Leeds, UK
    • Posts 176
    Hi,

    I have exactly the same happening on my server, does anyone have a fix for this ?

    Thanks
    James
  • Re: Parser Error Message: The entry 'ScriptModule' has already been added.

    02-13-2007, 4:27 PM
    • Contributor
      3,329 point Contributor
    • billrob458
    • Member since 07-25-2003, 2:44 AM
    • New York, NY
    • Posts 671

    This can happen if there are two HttpModules named "ScriptModule".  This can mysteriously happen if you are running a virtual directory under an asp application that already has the module defined.  You can either remove the HttpModule declaration <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> from the VD web.config, or all a remove node

    <remove name="ScriptModule" />

    just before adding it back.

  • Re: Parser Error Message: The entry 'ScriptModule' has already been added.

    02-13-2007, 4:46 PM
    • Member
      214 point Member
    • fizzystutter
    • Member since 11-15-2006, 6:08 PM
    • Leeds, UK
    • Posts 176

    Hi,

    Excellent, thanks for the heads up.

    James

  • Re: Parser Error Message: The entry 'ScriptModule' has already been added.

    08-13-2007, 5:50 PM
    • Member
      11 point Member
    • scampione
    • Member since 06-22-2007, 8:24 PM
    • Posts 7

    That was an excellent post.  Thank you for your help !

     

    Sam 

  • Re: Parser Error Message: The entry 'ScriptModule' has already been added.

    12-20-2007, 4:57 AM
    • Member
      2 point Member
    • krishnaveni
    • Member since 12-20-2007, 9:52 AM
    • Posts 1

    This suggest is not working for me again and again the same error only i am getting is there any other solution

    please let me know soon.......

  • Re: Parser Error Message: The entry 'ScriptModule' has already been added.

    03-14-2008, 12:52 PM
    • Member
      348 point Member
    • cheetahtech
    • Member since 02-28-2007, 6:33 PM
    • The States
    • Posts 130

     I agree, thank you very much for that post!

    Please remember to mark your post as "Resolved" when it is solved, and mark as "Answer" the post(s) that solved it!
  • Re: Parser Error Message: The entry 'ScriptModule' has already been added.

    09-01-2008, 12:25 PM
    • Participant
      1,399 point Participant
    • jagjot
    • Member since 10-19-2006, 9:02 AM
    • United Kingdom
    • Posts 749

    hi Billrod458,

    can you please help. i will die tomorrow if i cannot solve this.... i have same problem. it stsrted after installing 3.5 framework. i pasted web .config below.. i tried removing the scriptmodule but then i get (Parser Error Message: The server tag 'asp:ScriptManager' is ambiguous. Please modify the associated registration that is causing ambiguity and pick a new tag prefix.) error line 0.

     

    please help///

    <?xml version="1.0"?>
    <configuration>
     <configSections>
      
     </configSections>
      <appSettings>
        <!-- attachment save path -->
        <add key="attSavePath" value="~/temp/"/>
        <!-- gbrwgceumf01.eu.xerox.net -->
        <add key="smtpServer" value="localhost"/>
        <!-- Email Details: Thank you message to user -->
        <add key="fromEmail" value="Welwyn.OPDU.infrastructure.support@xerox.com"/>
        <add key="fromEmailName" value="Welwyn OPDU Infrastructure Support Team"/>
        <add key="strMsg" value="Your ticket has been received, one of the staff members will review it and reply accordingly. Listed below are details of this ticket, Please make sure the Ticket ID remains in the subject at all times."/>
        <!-- Email Details: Thank you message to Team -->
        <add key="fromEmailTeam" value="Welwyn.OPDU.infrastructure.support@xerox.com"/>
        <add key="fromEmailNameTeam" value="Welwyn OPDU Infrastructure Support Team"/>
        <!-- Email Details: reply by user to team -->
        <add key="strreplyMessage" value=""/>
        <!--<add key ="SqlConn" value ="RGF0YSBTb3VyY2U9MTMuMjEwLjE0MC4yNjtJbml0aWFsIENhdGFsb2c9SU1UaWNrZXRpbmc7UGVyc2lzdCBTZWN1cml0eSBJbmZvPVRydWU7VXNlciBJRD1qYWdqb3Q7UGFzc3dvcmQ9amFnam90"/> -->
      </appSettings>

      <connectionStrings>
        <add name="ConnectionString" connectionString="Data Source=13.210.241.52;Persist Security Info=True;User ID=eTicketApp;Password=eTicketApp17;pooling=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
      </connectionStrings>
      <system.web>
        <customErrors mode="Off" />
      <!--
                Set compilation debug="true" to insert debugging
                symbols into the compiled page. Because this
                affects performance, set this value to true only
                during development.

                Visual Basic options:
                Set strict="true" to disallow all data type conversions
                where data loss can occur.
                Set explicit="true" to force declaration of all variables.
            -->
      <compilation debug="true" strict="false" explicit="true">
       <assemblies>
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="Infragistics35.WebUI.WebHtmlEditor.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/>
        <add assembly="Infragistics35.WebUI.Shared.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/>
        <add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="Infragistics35.WebUI.UltraWebListbar.v8.1, Version=8.1.20081.1000, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/></assemblies>
      </compilation>
      <pages>
       <namespaces>
        <clear/>
        <add namespace="System"/>
        <add namespace="System.Collections"/>
        <add namespace="System.Collections.Generic"/>
        <add namespace="System.Collections.Specialized"/>
        <add namespace="System.Configuration"/>
        <add namespace="System.Text"/>
        <add namespace="System.Text.RegularExpressions"/>
        <add namespace="System.Linq"/>
        <add namespace="System.Xml.Linq"/>
        <add namespace="System.Web"/>
        <add namespace="System.Web.Caching"/>
        <add namespace="System.Web.SessionState"/>
        <add namespace="System.Web.Security"/>
        <add namespace="System.Web.Profile"/>
        <add namespace="System.Web.UI"/>
        <add namespace="System.Web.UI.WebControls"/>
        <add namespace="System.Web.UI.WebControls.WebParts"/>
        <add namespace="System.Web.UI.HtmlControls"/>
       </namespaces>
       <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
       </controls>
      </pages>
      <!--
                The <authentication> section enables configuration
                of the security authentication mode used by
                ASP.NET to identify an incoming user.
            -->
      <authentication mode="Windows"/>
      <!--
                The <customErrors> section enables configuration
                of what to do if/when an unhandled error occurs
                during the execution of a request. Specifically,
                it enables developers to configure html error pages
                to be displayed in place of a error stack trace.

            <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
                <error statusCode="403" redirect="NoAccess.htm" />
                <error statusCode="404" redirect="FileNotFound.htm" />
            </customErrors>
            -->
      <httpHandlers>
       <remove verb="*" path="*.asmx"/>
       <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
       <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
       <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
      </httpHandlers>
      <httpModules>
       <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </httpModules>
     </system.web>
     <system.codedom>
      <compilers>
       <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        <providerOption name="CompilerVersion" value="v3.5"/>
        <providerOption name="OptionInfer" value="true"/>
        <providerOption name="WarnAsError" value="false"/>
       </compiler>
      </compilers>
     </system.codedom>
     <!--
            The system.webServer section is required for running ASP.NET AJAX under Internet
            Information Services 7.0.  It is not necessary for previous version of IIS.
        -->
     <system.webServer>
      <validation validateIntegratedModeConfiguration="false"/>
      <modules>
       <remove name="ScriptModule"/>
       <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </modules>
      <handlers>
       <remove name="WebServiceHandlerFactory-Integrated"/>
       <remove name="ScriptHandlerFactory"/>
       <remove name="ScriptHandlerFactoryAppServices"/>
       <remove name="ScriptResource"/>
       <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
       <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
       <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </handlers>
     </system.webServer>
     <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
       <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
       </dependentAssembly>
       <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
       </dependentAssembly>
      </assemblyBinding>
     </runtime>
    </configuration>

    Jagjot Singh
    MCP, CCNA
  • Re: Parser Error Message: The entry 'ScriptModule' has already been added.

    09-02-2008, 8:34 AM
    • Member
      348 point Member
    • cheetahtech
    • Member since 02-28-2007, 6:33 PM
    • The States
    • Posts 130

    hey jagjot.

     When I upgraded to 3.5, I also was fed up with the web.config.  my solution was to create a NEW AJAX enabled website and get the Web.config file from that and move it over to my existing site.  Then I added the nessary things to it to get it up and running again.

    Also, just so you might be aware, you might not want to include your connection strings or emails in forums that are inside the web.config file.  It can have devestating consequences if someone wasn't ethical.

    Please remember to mark your post as "Resolved" when it is solved, and mark as "Answer" the post(s) that solved it!
  • Re: Parser Error Message: The entry 'ScriptModule' has already been added.

    09-02-2008, 8:53 AM
    • Participant
      1,399 point Participant
    • jagjot
    • Member since 10-19-2006, 9:02 AM
    • United Kingdom
    • Posts 749

    Thanks i am doing what you said looks like the solution..... Thanks....

    Jagjot Singh
    MCP, CCNA
  • Re: Parser Error Message: The entry 'ScriptModule' has already been added.

    04-19-2009, 11:26 PM
    • Member
      9 point Member
    • todd.liu
    • Member since 09-23-2008, 2:16 AM
    • China
    • Posts 5

     Parser Error Message: The entry 'ScriptModule' has already been added.

    Then, after I add a remove tag to web.config for scriptModule before the entry that adds it...... I get....

    Exception Details: System.InvalidCastException: Unable to cast object of type 'System.Web.Configuration.ScriptingAuthenticationServiceSection' to type 'System.Web.Configuration.ScriptingAuthenticationServiceSection'.

    I've been searching the net and the forums like mad, but I can't figure this out.

    I am thinking that perhaps my configuration on the web server is screwed because of all the various flavors of .net framework, but I really have no clue.

    If anyone has any ideas I'd really appreciate any help at all....

    I'm trying to get this site set up for a high scool and I'm getting nowhere.

    Thanks!

    Learning from all of you
  • Re: Parser Error Message: The entry 'ScriptModule' has already been added.

    04-20-2009, 8:54 AM
    • Member
      348 point Member
    • cheetahtech
    • Member since 02-28-2007, 6:33 PM
    • The States
    • Posts 130

    Make sure your not running under a Virtual Directory.

     Also, if that doesn't seem to work.  I suggest creating a brand new ASP.NET site and taking that Web.config the new site creates and bring it over to your site while changing the name of the old web.config.

     That should fix it if nothing else works.

    Please remember to mark your post as "Resolved" when it is solved, and mark as "Answer" the post(s) that solved it!
  • Re: Parser Error Message: The entry 'ScriptModule' has already been added.

    04-22-2009, 12:08 AM
    • Member
      9 point Member
    • todd.liu
    • Member since 09-23-2008, 2:16 AM
    • China
    • Posts 5

    Thanks very much .  I would like to clear some concept , :)

    1.creating a brand new ASP.NET site  : what's the mean?

    2. why I need to run the application not under a Virtual dictory.

    Learning from all of you
  • Re: Parser Error Message: The entry 'ScriptModule' has already been added.

    05-26-2009, 9:47 PM
    • Member
      9 point Member
    • todd.liu
    • Member since 09-23-2008, 2:16 AM
    • China
    • Posts 5

    Hi Guy,

    I suffered from this error for several days and also try to find the solution for several days. At last I found the very important feature which I omitted, the configuration file has the inherit feature. (http://msdn.microsoft.com/en-us/library/ms178685.aspx)

    So when you meet this error, you need to check if the parent virtual folder also contain the web.config which contain the conflict setting

    For example , contains between the following setting, if yes , please delete it .

    <httpModules><add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules>
     
    Learning from all of you
Page 1 of 1 (14 items)