Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • rasb 162 posts 218 karma points
    Feb 14, 2010 @ 00:50
    rasb
    0

    The entry 'ScriptModule' has already been added.

    I have an Umbraco 4.0.3 website on a Windows 2003, IIS 6.0, with a number Virtual Directories, that each contain their own ASP.NET applications and web.config files.

    I have added the paths to the umbracoReservedPaths entry in the Umbraco web.config. But when I try to access those paths, all I get is this error:

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

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

    Source Error: 

    Line 75:       </httpHandlers>
    Line 76:        <httpModules>
    Line 77:          <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    Line 78:         </httpModules>
    Line 79:    </system.web>

    Any suggestions on what is going wrong?

    Thanks,
    RasB

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Feb 14, 2010 @ 01:01
    Morten Bock
    1

    Do you have that entry in the web.config file of both umbraco and you virtual applications?

  • rasb 162 posts 218 karma points
    Feb 14, 2010 @ 01:13
    rasb
    0

    Yes they are in both web.config files.

    I thought that Virtual Directories were completely seperate from the main site. They are also in seperate Application Pools.

    Umbraco web.config:

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

    Virtual Dir web.config

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

    They are different versions. But they are also completely seperate applications... or should be.

    /RasB

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Feb 14, 2010 @ 07:22
    Aaron Powell
    0

    Virtual directories inherit all the web.config of their application.

    There's no need to use Virtual Directories with Umbraco, in fact they tend to cause more problem that they 'solve' (I'm very much against virtual directories to begin with). You need to have a <clear /> before you add any of your own HttpModels, otherwise you've all all the parents (including the Umbraco request module and UrlRewriting.NET).

  • rasb 162 posts 218 karma points
    Feb 14, 2010 @ 11:19
    rasb
    0

    Hi Slace,

    I agree with you! The problem is that we have a number of legacy Virtual Directories that are in use by external clients. They have nothing to do with our website, but are accessed through the same domain.

    The old site was an old ASP Classic site. So we never experienced this problem.

    I tried to add the  <clear /> method, but it just gave my new errors. So I am thinking that this is not the way forward at all.

    My plan now is to create a website root which is vd.mydomain.com and add the virtual directories under that root. Then I would like to catch these nodes on my new website somehow and redirect them to vd.mydomain.com/node. The ideal solution would be to redirect everything below a certain node, but just that one node called www.mydomain.com/vd_node -> vd.mydomain.com/vd_node is fine if nothing else is possible.

    Is there an easy way of doing this in Umbraco or do I need to write a new http handler?

    /RasB

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Feb 14, 2010 @ 11:40
    Morten Bock
    1

    You can do thay with the urlrewriting.config file. 

    <add name="domainRewrite"
                virtualUrl="http://(.*)example.com/vd_node"
                rewriteUrlParameter="ExcludeFromClientQueryString"
                destinationUrl="http://vd_node.example.com/vd_node"
                redirect="Domain"
                redirectMode="Permanent"
                ignoreCase="true" />

     

  • rasb 162 posts 218 karma points
    Feb 14, 2010 @ 12:09
    rasb
    0

    Perfect Morten... I will try that later this afternoon.

    The best part about our.umbraco.org is that there is always somebody around with a different angle on how to do stuff. I love it!

    /RasB

Please Sign in or register to post replies

Write your reply to:

Draft