I have an ordinary WebMatrix app with a bunch of .cshtml’s, a SQL CE database, some nuget dlls and helpers. And now after very little effort I seem to be able to run it beautifully together with an Umbraco 4.7 site. I still need to test it more thoroughly but initial tests have been running perfect.
1) Add a reserved path for the app in web.config:
<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/myapplication/" />
2) Enable webpages in web.config:
<add key="webpages:Enabled" value="true" />
3) Add a separate web.config file in the app path (/myapplication) to set the cshtml base class to the standard WebPages page base type (System.Web.WebPages.WebPage), and not the Umbraco one (umbraco.MacroEngines.DynamicNodeContext):
<configuration> <system.web.webPages.razor> <pages pageBaseType="System.Web.WebPages.WebPage"> <namespaces> <add namespace="Microsoft.Web.Helpers" /> </namespaces> </pages> </system.web.webPages.razor> </configuration>
Now I can run ordinary .cshtml files completely outside Umbraco context from my /myapplication/ folder.
Big thanks to Elijah Glover for helping me out with this.
I’m about to try the other way around aswell, i.e. run Umbraco from within a subfolder.