【发布时间】: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>
还有
<add name="X-UA-Compatible" value="IE=edge" />
我还尝试将<meta http-equiv="X-UA-Compatible" content="IE=Edge" /> 添加到我的 .cshtml 视图页面的顶部。
【问题讨论】:
标签: c# asp.net powerbi internet-explorer-11 ie8-compatibility-mode