1

I have an old version of Umbraco running (4.7), working fine. Inside, I want to run a separate .NET MVC application (virtual directory). I'm having problems with Web.config inheritance... <location> tag doesn't seem to solve it.

Umbraco Web.config:

<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
      <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
    </sectionGroup>
  </configSections>
...
<location path="." inheritInChildApplications="false">
    <system.web.webPages.razor>
      <host factoryType="umbraco.MacroEngines.RazorUmbracoFactory, umbraco.MacroEngines" />
      <pages pageBaseType="umbraco.MacroEngines.DynamicNodeContext">
        <namespaces>
          <add namespace="Microsoft.Web.Helpers" />
          <add namespace="umbraco" />
          <add namespace="Examine" />
        </namespaces>
      </pages>
    </system.web.webPages.razor>
  </location>

MVC App Views/Web.config

<configSections>
    <!--Error here-->
    <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
      <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
    </sectionGroup>
  </configSections>

Error:

Section or group name 'system.web.webPages.razor' is already defined. Updates to this may only occur at the configuration level where it is defined.

Is there anything I'm missing?

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Duke
  • 145
  • 3
  • 11
  • 5
    Hey Duke, have you got a chance to take a look at the [similar issue](http://stackoverflow.com/questions/16255667/how-to-prevent-mvc-4-child-application-inheriting-parent-application-umbraco-mv)? – Marko Jovanov Dec 09 '15 at 08:44

0 Answers0