[我们刚刚开始一个项目,该项目将合并我们当前在线的IE8 asp经典站点和asp.net IE11的新片段。我当前的项目是将一个asp.net页面嵌入到IE8网站中,该页面将加载嵌入式Power BI报告。
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>
以及
<add name="X-UA-Compatible" value="IE=edge" />
我也尝试过将<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
添加到我的.cshtml视图页面的顶部。
我认为这是不可能的。 IE不允许在帧层次结构中混合使用IE9 +和较旧的模式。有关更多信息,可以参考this thread。
我还在线程中测试了示例,在iframe中可以获取的最高文档模式是IE 8。