升级到.NET 4.5之后的iFrame解析错误 [英] iFrame parser error after upgrading to .NET 4.5

查看:879
本文介绍了升级到.NET 4.5之后的iFrame解析错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近升级我们所有的WebForms项目,以.NET 4.5,并加载与的iFrame 元素的网页时遇到的解析器问题。我们已经通过了的iFrame HtmlGenericControl HtmlIframe 。这已经纠正了所有的分析器错误,当我们在本地运行我们的code。

We have recently upgraded all of our WebForms projects to .NET 4.5, and encountered a parser issue when loading pages with an iFrame element. We have corrected this by converting of the iFrame from HtmlGenericControl to HtmlIframe. This has corrected all of the parser errors when we run our code locally.

当我们部署应用程序,我们得到以下错误信息:

When we deploy the app, we get the following error message:

分析器错误信息:基类包括字段框架,但它的类型(System.Web.UI.HtmlControls.HtmlIframe)不与控件的类型兼容(System.Web.UI.HtmlControls.HtmlGenericControl) **

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

当我部署旧code与 HtmlGenericControl 错误消失表明,即使我们已经安装了.NET 4.5,服务器仍使用旧版?

When I deploy the old code with the HtmlGenericControl the error goes away suggesting that even though we have installed .NET 4.5, the server is still using an older version?

我试着拆卸和重新安装.NET它确保与IIS注册ASP。

I've tried removing and reinstalling .NET it making sure to register asp with IIS.

Windows 2008 R2上与IIS 7.5和.NET 4.5

Windows 2008 R2 with IIS 7.5 and .NET 4.5

推荐答案

我们能够解决这个问题转换

We were able to fix the issue converting the

<iframe id="iframe" runat="server" />

<asp:HtmlIframe id="iframe" runat="server" />

这篇关于升级到.NET 4.5之后的iFrame解析错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆