Web.config继承 - 位置不起作用

时间:2015-12-07 09:53:18

标签: asp.net asp.net-mvc razor web-config umbraco

我有一个旧版本的Umbraco正在运行(4.7),工作正常。在里面,我想运行一个单独的.NET MVC应用程序(虚拟目录)。我遇到Web.config继承问题...... <location>标记似乎无法解决它。

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>

错误:

  

部分或群组名称&#39; system.web.webPages.razor&#39;已定义。   对此的更新可能仅发生在配置级别   定义

我有什么遗失的吗?

0 个答案:

没有答案