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?
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.
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/" />
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.
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??
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 -->
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.
Line 147: </system.web>
Line 148: <!-- ASPNETAJAX -->
Line 149: <system.web.extensions> Line 150: <scripting> Line 151: <scriptResourceHandler enableCompression="true" enableCaching="true" />
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.
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.
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
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
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>
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
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
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
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:
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
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?
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
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
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.
Thank you so much!!
is working on a reply...