Copied to clipboard

Flag this post as spam?

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


  • Flemming Christensen 13 posts 50 karma points
    Dec 07, 2011 @ 14:45
    Flemming Christensen
    0

    Running seperate website in subfolder

    Hi,

    I have a problem with a project where part of an old website is moved to Umbraco, and the rest of it needs to run as it is.

    What I was aiming for was to have umbraco in the root folder, and then move the old app into a subfolder with it's own web.config (connection string and appsetttings)

    But when I try to call into the subfolder ex. "www.domain.dk/oldapp/default.aspx" I get this error:

    404 - File or directory not found.

    The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

    Is there something I can change or add to the umbraco web.config to make it possible run a separate website in a subfolder in the umbraco structure?

    I'm using Umbraco 4.7.1

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 07, 2011 @ 14:57
    Tom Fulton
    0

    Hi,

    You will need to update the umbracoReservedPaths setting in your web.config file to exclude your "~/oldapp/" directory, otherwise Umbraco will look for it as content.

    Also, if your sub directory is it's own application and it's own web.config you might need to adjust the umbraco web.config to prevent the Umbraco-specific stuff from being inherited into your child app.  See this thread for solution.

    -Tom

  • Flemming Christensen 13 posts 50 karma points
    Dec 12, 2011 @ 04:22
    Flemming Christensen
    0

    Hi again

    Tom, your solution is not enough.

    I have created a virtual directory for my \webshop folder with alias name "online". It's for a .net 3.5 website (not web application) with it's own web.config, and precompile appcode files.

    I have changed the umbracoReservedPaths to <add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/online/" />

    I have sorrounded the <system.web> tag with :

    <location path="." inheritInChildApplications="false">

    <system.web>

    When I write http://<domainname>/online/webshop.aspx this is what I get:

    Server Error in '/' Application.


    The resource cannot be found.

    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

    Requested URL: /online/webshop.aspx
  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 12, 2011 @ 14:08
    Tom Fulton
    0

    Hi,

    That should be all you have to do, except I had to also include the system.webServer tag in the location wrapping ie <location ...><system.web>...</system.web><system.webServer>...</system.webServer> - but I don't think that's your issue.  Are you sure you've setup the alias correctly as online and webshop.aspx exists??

    -Tom

  • All Blonde 86 posts 138 karma points
    Dec 14, 2011 @ 17:00
    All Blonde
    0

    Currently I setup old site  as a virtual folder on umbraco site.

    Dispaite changing <add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/virtsico/" /> umbraco ignoring this change and try to run old site as a part of umbarco. That is a problem.

    Worse part that if old site uses different version of the NET than both site get killed.

    Here is what I got if version of NET are the same in Umbraco and Virtual folder:

    Server Error in '/virtsico' Application.


    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: Could not load file or assembly 'UrlRewritingNet.UrlRewriter' or one of its dependencies. The system cannot find the file specified. (C:\Inetpub\wwwroot\umbarco\TestingCMS\web.config line 78)

    Source Error:

    Line 76:     <httpModules>
    Line 77:       <!-- URL REWRTIER -->
    Line 78: <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" /> Line 79:       <add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
    Line 80:       <!-- UMBRACO -->


    Source File: C:\Inetpub\wwwroot\umbarco\TestingCMS\web.config    Line: 78


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225

  • All Blonde 86 posts 138 karma points
    Dec 15, 2011 @ 22:08
    All Blonde
    0

    Here is result if NET version for Umbraco is different from virtual folder(separate app pools) Umbraco NET 4.0 and virtual folder NET 2.0. Main result is both site got killed with the same error:

    Server Error in '/virtsico' Application.


    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: Unrecognized configuration section system.web.extensions.

    Source Error:

    Line 147:  </system.web>
    Line 148:  <!-- ASPNETAJAX -->
    Line 149: <system.web.extensions>
    Line 150: <scripting>
    Line 151: <scriptResourceHandler enableCompression="true" enableCaching="true" />

    Source File: C:\Inetpub\wwwroot\umbarco\TestingCMS\web.config    Line: 149


    Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053 

     

     

  • All Blonde 86 posts 138 karma points
    Dec 15, 2011 @ 22:11
    All Blonde
    0

    Each application if setup separatly with same setting (NET 4 for Umbraco and NET 2 for virtsico) runs fine.

    I can understand why Umbraco got killed since it is build on NET 4 but why it ignoring direction in config.

    As I understand Umbraco suppose to ignore virtual folder once it is defined in umbracoReservedPaths, right?

    Is there any other place where this behaviur can be changed?

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Dec 15, 2011 @ 22:21
    Tom Fulton
    0

    Hi,

    The first error you are getting is because umbraco's web.config is pushing down into your child app's web.config (this is default behavior).  You can stop this by wrapping your <system.web> and <system.webServer> tags with <location path="." inheritInChildApplications="false"> in umbraco's web.config.  See this thread for details.

    -Tom

  • All Blonde 86 posts 138 karma points
    Dec 15, 2011 @ 22:27
    All Blonde
    1

    Tom you rock, thanks man.

    Flemming, here is what you need to do:

    Make sure that your old app (aspx website is still app and should have app pool assigned to it) running on the same version of NET as Umbarco. Preferably they should run on separate app pools.

    since you already have umbracoReservedPaths,

    wrap

     

    <locationpath="."inheritInChildApplications="false">
    <system.web>
    ....../
    </system.web>
    </location>
  • Flemming Christensen 13 posts 50 karma points
    Sep 17, 2012 @ 22:17
    Flemming Christensen
    1

    We ended up, just excluding the online folder from umbraco, and adding the dll for the website to the umbraco bin folder.

    We couldn't get any of the other suggestions to work.

  • Yoni 49 posts 118 karma points
    Jul 29, 2014 @ 14:38
    Yoni
    0

    Thank you so much!!

Please Sign in or register to post replies

Write your reply to:

Draft