0

我正在使用来自 2sxc.org 的 Tiles 应用程序。当 Razor 模板位置被选为主机文件系统时,它会引发以下错误

在此处输入图像描述

剃须刀模板工作的 /Portals/0/2sxc 文件夹下的Web.Config

<?xml version="1.0"?>

<configuration>
  <configSections>
    <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor">
      <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor" requirePermission="false" />
    </sectionGroup>
  </configSections>

  <system.web.webPages.razor>
    <pages pageBaseType="ToSic.SexyContent.Razor.SexyContentWebPage">
      <namespaces>
        <!--<add namespace="Microsoft.Web.Helpers" />
        <add namespace="WebMatrix.Data" />-->
      </namespaces>
    </pages>
  </system.web.webPages.razor>
</configuration>

Web.Config 门户 *在 /Portals/ 文件夹下 *

<?xml version="1.0"?>
<configuration>  
  <configSections>
    <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor">
      <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor" requirePermission="false" />
      <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <system.web.webPages.razor>
    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc"/>
    <pages pageBaseType="DotNetNuke.Web.Mvc.Framework.DnnWebViewPage">
      <namespaces>
        <add namespace="System.Linq"/>
        <add namespace="System.Web.Mvc"/>
        <add namespace="System.Web.Routing"/>
        <add namespace="DotNetNuke.Web.Mvc.Helpers"/>
      </namespaces>
    </pages>
  </system.web.webPages.razor>
</configuration>

Web.Config Host /Portals/_default/2sxc下没有web.config文件

平台和 2sxc 版本: DNN Evoq Content 08.04.02 (5) (本地和基于 Azure 的安装都出现相同的错误) 2sxc 8.5.4

4

0 回答 0