【问题标题】:How to run IE11 page in frame of IE8 website如何在IE8网站框架中运行IE11页面
【发布时间】:2019-10-22 19:19:55
【问题描述】:

我们刚刚开始了一个项目,该项目将合并我们当前的 IE8 asp 经典站点和新的 asp.net IE11 站点。我当前的项目是在加载嵌入式 Power BI 报告的 IE8 站点中嵌入一个 asp.net 页面。

Power BI 需要 IE11 及更高版本才能正常运行。在 IE 11 服务器上运行时,此页面运行良好,没有问题。当我在 asp 经典网站的框架中加载这个 asp.net 页面时,我们在 power bi 的一些脚本和样式表上收到“由于 mime 类型不匹配而被阻止”错误。

asp经典站点以企业兼容模式运行。

有没有办法在框架中加载asp.net页面并作为IE11运行?

我已尝试将以下代码添加到我的 web.config 文件中。

<system.webServer>
        <httpProtocol>
            <customHeaders>
                <add name="X-Content-Type-Options" value="nosniff" />
            </customHeaders>
        </httpProtocol>
        <modules runAllManagedModulesForAllRequests="true">
            <remove name="TelemetryCorrelationHttpModule" />
            <add name="TelemetryCorrelationHttpModule" type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation" preCondition="integratedMode,managedHandler" />
        </modules>
    </system.webServer>

还有

&lt;add name="X-UA-Compatible" value="IE=edge" /&gt;

我还尝试将&lt;meta http-equiv="X-UA-Compatible" content="IE=Edge" /&gt; 添加到我的 .cshtml 视图页面的顶部。

【问题讨论】:

    标签: c# asp.net powerbi internet-explorer-11 ie8-compatibility-mode


    【解决方案1】:

    我认为这是不可能的。 IE 不允许在框架层次结构中混合 IE9+ 和旧模式。有关详细信息,您可以参考 this thread。我还在线程中测试了示例,我可以得到的 iframe 中的最高文档模式是 IE 8。

    您也可以参考this article 了解更多信息。如文章所述:

    从 IE9 模式开始,网页无法显示多种文档模式。例如,考虑一个基于标准的网页,该网页包含一个以 quirks 模式显示内容的框架元素。 IE9 模式以标准模式显示子框架(因为父文档处于标准模式)。

    【讨论】:

      猜你喜欢
      • 2016-09-01
      • 1970-01-01
      • 2015-03-23
      • 1970-01-01
      • 1970-01-01
      • 2011-02-23
      • 1970-01-01
      相关资源
      最近更新 更多