简体   繁体   中英

Sitecore 6.x /sitecore/login Parser Error

I found out one interesting issue with sitecore admin page if my setting in web conашп target to 4.5 framework is next

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

Iam gettting next error:

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> 

if targetFramework arrrib is 4.0 all working fine. How to fix it ? My goal is work in full 4.5 FW mode, I had set up additionally

<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"/>

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

Thanks

Found a super simple solution to this in Sitecore 6.6. Just rename the iFrame to div!

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

Your target framework must be 4.0 in order for Sitecore to work properly. Version 4.5 is not yet supported

First you'll need to find and edit the file default.aspx in Website\\sitecore\\login.

Change this:

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

to this:

<div id="SDN">
    <div id="StartPage>   </div>
</div>

Save this file.

The iframe displays browser compabitibilty information from sitecore on the right side of the login page.

What happens is that when you use .NET 4.5, the iframe compiles to an HtmlIframe control. The code behind file from sitecore however has the iframe as an HtmlGeneric control. Hence the message.

By changing the iframe to a div, ASP.NET will generate an HtmlGeneric from the .aspx page which matches what is in the compiled code behind and the login page is then able to load.

我得到了相同的错误,并在web.config文件中的复杂性条目中添加了“targetFrameowkr = 4.5.1”并修复了问题。

我遇到了同样的问题,并且我已经将web.config文件中的目标框架从4.0更改为4.5。

我找到了解决方案,我只需要自定义登录页面。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM