如何prevent MVC 4子应用程序继承父应用程序(一把umbraco MVC3)的web.config [英] How to Prevent MVC 4 Child Application inheriting Parent Application (Umbraco MVC3) web.config
问题描述
我有一把umbraco部署在服务器上。目前,我尝试部署MVC 4应用作为一个孩子的应用程序,但不知孩子的意见\\ web.config中继承了一把umbraco的web.config中的configSections和sectionGroup。这将导致以下的错误
I have Umbraco deployed on the server. Currently I am trying to deploy MVC 4 Application as a child application but somehow the child's views\web.config inherits the configSections and sectionGroup from Umbraco's web.config. This results in the following error
节或组名system.web.webPages.razor'已定义。可能只发生在定义它的配置级别更新此名称。
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.
一把umbraco的sectionGroup
Umbraco's sectionGroup
<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>
子应用程序(MVC4)sectionGroup
Child Application (MVC4) sectionGroup
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
如何从发生prevent呢?
How can I prevent this from happening?
推荐答案
我有相同的问题。
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31BF3856AD364E35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
这篇关于如何prevent MVC 4子应用程序继承父应用程序(一把umbraco MVC3)的web.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!