gpt4 book ai didi

asp.net - Sitecore 6.x/sitecore/login 解析器错误

转载 作者:行者123 更新时间:2023-12-05 01:15:53 26 4
gpt4 key购买 nike

我在 sitecore 管理页面发现了一个有趣的问题如果我在 web conашп 中的设置接下来是 4.5 框架

>  compilation defaultLanguage="c#" debug="true" targetFramework="4.5"
> enablePrefetchOptimization="true"

我收到下一个错误:

Parser Error 
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The base class includes the field 'StartPage', but its type (System.Web.UI.HtmlControls.HtmlGenericControl) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlIframe).

Source Error:


Line 71: </div>
Line 72: <div id="SDN">
Line 73: <iframe id="StartPage" runat="server" allowtransparency="true" frameborder="0" scrolling="auto"
Line 74: marginheight="0" marginwidth="0" style="display: none"></iframe>
Line 75: </div>

如果 targetFramework arrrib 是 4.0,一切正常。如何解决?我的目标是在完整的 4.5 FW 模式下工作,我另外设置了

<httpRuntime 
encoderType="System.Web.Security.AntiXss.AntiXssEncoder,System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
maxRequestLength="512000"
executionTimeout="600"
enableKernelOutputCache="false"
targetFramework="4.5"
requestValidationMode="4.0"/>

<add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>

谢谢

最佳答案

在 Sitecore 6.6 中找到了一个 super 简单的解决方案。只需将 iFrame 重命名为 div!

      <div id="SDN">
<div id="StartPage" runat="server" allowtransparency="true" frameborder="0" scrolling="auto"
marginheight="0" marginwidth="0" style="display: none"></div>
</div>

关于asp.net - Sitecore 6.x/sitecore/login 解析器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13884246/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com