I'm attempting to run umbraco in the root of my hosting provider (godaddy) and version 4.5.0 is working great except that I'm trying to run nopCommerce 1.60 on a subfolder but Umbraco URL Rewrite keeps trying to parse the subsite and throws the error below:
Server Error in '/loja' Application.
Could not load type 'umbraco.presentation.requestModule'.
Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details:System.Web.HttpException: Could not load type 'umbraco.presentation.requestModule'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I've seen this problem when trying to run a virtual directory within the Umbraco instance. The problem is caused because a virtual directory has a web.config which inherits the web.config of the parent application.
All the HttpHandlers, HttpModels, etc will be appended to the child applications web.config.
You can get around this by clearing the sections before adding your own HttpHandlers & HttpModules, like so:
The other way (and the way I'd recommend) is that you run your application under a separate IIS instance, and then on a sub-domain. You can use URL rewriting to redirect to the subdomain.
I have changed the web.config for nopCommerce and it's still throwing the same error. I really would like to use umbraco for the corporate site and nopCommerce for the online store and since I'm using a shared hosting account at Godaddy purchasing a secondary IIS instance is not an option.
Yes, the folder is setup as a virtual directory (see screenshot)
I'm pretty sure that I've missed something in the configuration, but I've already tried all the suggested fixes and still no luck. I'm just hoping someone can spot the place where I messed up... after all, several heads think better than one alone.
Thanks for all the help so far, and hopefully I can sort this one out soon because I need to deliver this project as soon as possible.
Yes, I've just tested it and created some screenshots to help investigate this issue. On a Local IIS 7 instance, running on a SQL 2008 and Windows Enterprise Server 2008 I've installed Umbraco 4.5.0 and nopCommerce 1.60 (same as godaddy) and successfully replicated the issue:
Umbraco web.config
nopCommerce web.config
IIS settings
Replicated error
The nopCommerce folder is setup as a virtual folder, so I'm not sure how to exclude the assemblies from being loaded into nopCommerce since in Godaddy I don't have the option of setting up another IIS instance (within the same domain name at least).
Has anyone come across a solution for this? I've thought of splitting the umbraco from the nopCommerce (redirect 302 the root to www2.unicacabeloeestetica.com and keep loja.unicacabeloeestetica.com) but I'm not sure that's SEO best practice.
By splitting the applications into virtual directories the root of the domain would not have the umbraco but it would be empty, only redirecting to the virtual directory www2. I've seen many sites do this and wonder if anyone had found an actual solution for this before I went with this alternative solution. Once I go with that I won't be able to turn back, so I wanted to make sure this was the only alternative.
I just did a little test. Make it so the wraps the <system.webserver> tags also...like below. This works for me using a .net app as in a virtual directory.
Wrapping the system.web and system.webServer sections only didn't work for me. Categories pages would not display at all. However I easily fixed it by wrapping all remaining sections except for configSections. This also dispensed me from adding LocalSqlServer to the connectionsString:)
I had problems figuring out which section(s) to include inside the location with path "." tag. I tried various combinations, but couldn't get any to work.
For anyone who couldn't figure it out, like me, you can do the reverse: set a location for your virtual app, like so:
Assumed: virtual app is located at www.example.com/internal
I'm struggling with the same thing I think; I simply want to create a small Razor/WebPages2 app in Visual Studio, Publish it, put the published files in a folder within the umbraco site structure (so oursite.com/razorsite), and have it run. I've done the steps most folks outline:
in IIS, convert the /razorsite folder to Application
add <location path="." inheritInChildApplications="false"> tag around just <system.web> section of root site's web.config
add ~/razorsite to the umbracoReservedPaths key in web.config
edit the /razorsite web.config file to remove all the umbraco and rewriting modules (see below)
But having done all the things I think should work, I still get the "Could not load file or assembly UrlRewritingNet.UrlRewriter" error. If I put <location> tags around <system.webServer> as some suggestion, then the .cshtml files in /razorsite don't run at all.
Exclude non-umbraco web application (subsite)
I'm attempting to run umbraco in the root of my hosting provider (godaddy) and version 4.5.0 is working great except that I'm trying to run nopCommerce 1.60 on a subfolder but Umbraco URL Rewrite keeps trying to parse the subsite and throws the error below:
Server Error in '/loja' Application.
Could not load type 'umbraco.presentation.requestModule'.
Exception Details: System.Web.HttpException: Could not load type 'umbraco.presentation.requestModule'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016
I'd like to know how to exclude the subsite from the umbraco framework so I can run the eCommerce on the subsite.
Any ideas anyone?
Add the folder into the app key umbracoReservedPaths in the web.config:
for v4.5:
for v4.0 and below:
hth, Thomas
Yes, I've already done that (see below) but I still see the same error:
<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/loja,~/lojax" />
Also tried
<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~loja,~lojax" /> and no good. I'm using version 4.5.0
Did I miss something?
I've seen this problem when trying to run a virtual directory within the Umbraco instance. The problem is caused because a virtual directory has a web.config which inherits the web.config of the parent application.
All the HttpHandlers, HttpModels, etc will be appended to the child applications web.config.
You can get around this by clearing the sections before adding your own HttpHandlers & HttpModules, like so:
The other way (and the way I'd recommend) is that you run your application under a separate IIS instance, and then on a sub-domain. You can use URL rewriting to redirect to the subdomain.
I have changed the web.config for nopCommerce and it's still throwing the same error. I really would like to use umbraco for the corporate site and nopCommerce for the online store and since I'm using a shared hosting account at Godaddy purchasing a secondary IIS instance is not an option.
The web.config on the subsite is now:
Is it configured as a virtual directory (the nopCommerce folder)?
Yes, the folder is setup as a virtual directory (see screenshot)
I'm pretty sure that I've missed something in the configuration, but I've already tried all the suggested fixes and still no luck. I'm just hoping someone can spot the place where I messed up... after all, several heads think better than one alone.
Thanks for all the help so far, and hopefully I can sort this one out soon because I need to deliver this project as soon as possible.
Does this only happen on the hosting or can you reproduce this on a local/ dev machine?
Yes, I've just tested it and created some screenshots to help investigate this issue. On a Local IIS 7 instance, running on a SQL 2008 and Windows Enterprise Server 2008 I've installed Umbraco 4.5.0 and nopCommerce 1.60 (same as godaddy) and successfully replicated the issue:
Umbraco web.config
nopCommerce web.config
IIS settings
Replicated error
The nopCommerce folder is setup as a virtual folder, so I'm not sure how to exclude the assemblies from being loaded into nopCommerce since in Godaddy I don't have the option of setting up another IIS instance (within the same domain name at least).
Has anyone come across a solution for this? I've thought of splitting the umbraco from the nopCommerce (redirect 302 the root to www2.unicacabeloeestetica.com and keep loja.unicacabeloeestetica.com) but I'm not sure that's SEO best practice.
By splitting the applications into virtual directories the root of the domain would not have the umbraco but it would be empty, only redirecting to the virtual directory www2. I've seen many sites do this and wonder if anyone had found an actual solution for this before I went with this alternative solution. Once I go with that I won't be able to turn back, so I wanted to make sure this was the only alternative.
Hi,
try wrapping your umbraco web.config <system.web> tags in:
<location path="." inheritInChildApplications="false" >
<system.web>
</system.web>
</location>
I have done this many time to avoid inheritance.
Eric
Eric,
It did not work. I definitely must be doing something wrong. Below is the snippet from the umbraco web.config:
Hi,
I just did a little test. Make it so the wraps the <system.webserver> tags also...like below. This works for me using a .net app as in a virtual directory.
Eric
<location path="." inheritInChildApplications="false">
<system.web>
<!-- <trust level="Medium" originUrl=".*" /> -->
<customErrors mode="Off" />
<trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
<globalization requestEncoding="UTF-8" responseEncoding="UTF-8" />
<xhtmlConformance mode="Strict" />
<pages enableEventValidation="false">
<!-- ASPNETAJAX -->
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add tagPrefix="umbraco" namespace="umbraco.presentation.templateControls" assembly="umbraco" />
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</controls>
</pages>
<httpModules>
<!-- URL REWRTIER -->
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
<add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
<!-- UMBRACO -->
<add name="viewstateMoverModule" type="umbraco.presentation.viewstateMoverModule, umbraco" />
<add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule, umbraco" />
<!-- ASPNETAJAX -->
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<!-- CLIENT DEPENDENCY -->
<add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core" />
</httpModules>
<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" />
<!-- UMBRACO CHANNELS -->
<add verb="*" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />
<add verb="*" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />
<!-- CLIENT DEPENDENCY -->
<add verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core " />
<!-- SPELL CHECKER -->
<add verb="GET,HEAD,POST" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco" />
</httpHandlers>
<compilation defaultLanguage="c#" debug="false" batch="false">
<assemblies>
<!-- ASPNETAJAX -->
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Core, 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.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</assemblies>
</compilation>
<authentication mode="Forms">
<forms name="yourAuthCookie" loginUrl="login.aspx" protection="All" path="/" />
</authentication>
<authorization>
<allow users="?" />
</authorization>
<!-- Membership Provider -->
<membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<clear />
<add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Another Type" passwordFormat="Hashed" />
<add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />
</providers>
</membership>
<!-- added by NH to support membership providers in access layer -->
<roleManager enabled="true" defaultProvider="UmbracoRoleProvider">
<providers>
<clear />
<add name="UmbracoRoleProvider" type="umbraco.providers.members.UmbracoRoleProvider" />
</providers>
</roleManager>
<!-- Sitemap provider-->
<siteMap defaultProvider="UmbracoSiteMapProvider" enabled="true">
<providers>
<clear />
<add name="UmbracoSiteMapProvider" type="umbraco.presentation.nodeFactory.UmbracoSiteMapProvider" defaultDescriptionAlias="description" securityTrimmingEnabled="true" />
</providers>
</siteMap>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<remove name="ScriptModule" />
<remove name="UrlRewriteModule" />
<remove name="umbracoRequestModule" />
<remove name="viewstateMoverModule" />
<remove name="umbracoBaseRequestModule" />
<remove name="ClientDependencyModule" />
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
<add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
<add name="viewstateMoverModule" type="umbraco.presentation.viewstateMoverModule" />
<add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core" />
</modules>
<handlers accessPolicy="Read, Write, Script, Execute">
<remove name="WebServiceHandlerFactory-Integrated" />
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<remove name="Channels" />
<remove name="Channels_Word" />
<remove name="ClientDependency" />
<remove name="SpellChecker" />
<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" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add verb="*" name="Channels" preCondition="integratedMode" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />
<add verb="*" name="Channels_Word" preCondition="integratedMode" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />
<add verb="*" name="ClientDependency" preCondition="integratedMode" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core " />
<add verb="GET,HEAD,POST" preCondition="integratedMode" name="SpellChecker" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco" />
</handlers>
</system.webServer>
</location>
Eric,
Bingo!!!! That was the fix. I've had to add the following line to the <connectionStrings> section of the nopCommerce (subsite):
But now the subsite is showing up! Thanks for the help!
Wrapping the system.web and system.webServer sections only didn't work for me. Categories pages would not display at all. However I easily fixed it by wrapping all remaining sections except for configSections. This also dispensed me from adding LocalSqlServer to the connectionsString:)
I had problems figuring out which section(s) to include inside the location with path "." tag. I tried various combinations, but couldn't get any to work.
For anyone who couldn't figure it out, like me, you can do the reverse: set a location for your virtual app, like so:
Assumed: virtual app is located at www.example.com/internal
It's probably not the best way, but it worked for me given the circumstances.
I'm struggling with the same thing I think; I simply want to create a small Razor/WebPages2 app in Visual Studio, Publish it, put the published files in a folder within the umbraco site structure (so oursite.com/razorsite), and have it run. I've done the steps most folks outline:
is working on a reply...