【问题标题】:RDLC ReportViewer Browser Not Supported不支持 RDLC ReportViewer 浏览器
【发布时间】:2019-07-06 07:36:14
【问题描述】:

我有一个使用 ReportViewer 15.0 版的网站。当我在 IE 11 中打开时,它显示错误: 不支持浏览器

报表查看器需要符合标准的浏览器。 Internet Explorer 8 和更早版本的用户应该切换到现代浏览器,或者如果已经使用现代浏览器目标标准模式,则通过将标题标签添加到主机页面

我之前使用过 ReportViewer 10.0 版,它在 IE 11 中也可以在 IE8 中使用。我可以在 IE 11 中使用 ReportViewer 15.0 版吗? 我尝试在标签<head> 中添加此代码,但它不起作用

<meta http-equiv="X-UA-Compatible" content="IE=11" >
<meta http-equiv="X-UA-Compatible" content="IE=Emulate11" >

【问题讨论】:

    标签: asp.net vb.net visual-studio rdlc reportviewer


    【解决方案1】:

    添加以下 no-js 行,对我有用

    <!doctype html>
    <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
    <!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
    <!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <html class="no-js" lang="en">
    <!--<![endif]-->
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=9">
    

    【讨论】:

      【解决方案2】:

      使用这种形式:
      请注意,最好在&lt;head&gt; 之后插入&lt;meta&gt; 标签。

      <!DOCTYPE html>
      <head>
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      [...] Other
      </head>
      

      IE=edge强制IE使用最高可用模式,避免触发兼容模式。
      添加 chrome=1 如果 Google Chrome Frame 仍然是一个选项(一些 html 验证器可能会将此条目标记为错误)。

      这也适用于 .Net Framework 的 WebBrowser 控件:将 HTML5 文档标题和标签添加到 HTML 文档中,会使 WebBrowser 在 IE11 模式下工作,而无需编辑 FEATURE_BROWSER_EMULATION 注册表键,如图所示,例如,这里:

      How can I get the WebBrowser control to show modern contents?

      如果您在某处读到 &lt;!DOCTYPE html&gt; 会导致 IE 使用可用的最高模式,您会(有时)感到失望。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-02-09
        • 2018-03-27
        • 1970-01-01
        • 1970-01-01
        • 2012-04-10
        • 2019-07-30
        相关资源
        最近更新 更多