ReportViewer IE 11

vik*_*ben 16 c# asp.net reportviewer internet-explorer-11

我的3.5框架webforms网站上有一个显示报告的页面.它使用报告查看器10.0.0.0.除了IE11之外,每个浏览器的报告都会呈现.只有以doc类型格式显示信息的报表才会呈现为html表并存储在.rdl文件中.param框加载,但是当选择并运行报告时,我只是获取加载gif并且它超时.我已经尝试使用IE11开发工具进行故障排除,并且在打开它时超时,这是一个完美的风暴.另一点信息我在VS2012本地运行网站,在IE11中它只是在IIS7服务器上呈现.

我已经尝试了一个自定义.browser文件来模拟IE10没有运气.任何帮助都会受到影响,或者只是知道我不是唯一的帮助.

更新:我在服务器日志中发现了异常.HttpHandlerInputException,缺少URL参数:IterationId.

提前致谢.

vik*_*ben 17

在评论中列出的网址上找到它.我不敢相信,当微软推出新的浏览器时,我们不会像我们那样进行测试.

void Application_BeginRequest(object sender, EventArgs e)
{
    // Bug fix for MS SSRS Blank.gif 500 server error missing parameter IterationId
    // https://connect.microsoft.com/VisualStudio/feedback/details/556989/
    if (HttpContext.Current.Request.Url.PathAndQuery.StartsWith("/Reserved.ReportViewerWebControl.axd") &&
     !String.IsNullOrEmpty(HttpContext.Current.Request.QueryString["ResourceStreamID"]) &&
        HttpContext.Current.Request.QueryString["ResourceStreamID"].ToLower().Equals("blank.gif"))
    {
        Context.RewritePath(String.Concat(HttpContext.Current.Request.Url.PathAndQuery, "&IterationId=0"));
    }
}
Run Code Online (Sandbox Code Playgroud)


liv*_*ove 5

我在使用 ReportViewer 10 和 IE11 时也遇到了问题。

\n\n

升级到 ReportViewer 11 (Sql Server 2012) 解决了我的问题。

\n\n
    \n
  • 下载并安装 MICROSOFT\xc2\xae REPORT VIEWER 2012 RUNTIME:\n http://www.microsoft.com/en-us/download/confirmation.aspx?id=35747

  • \n
  • 转到 GAC 文件夹:\nC:\\Windows\\ assembly\\gac_msil

  • \n
  • 找到刚刚安装的 Microsoft.ReportViewer dll。

  • \n
  • 将 Microsoft.ReportViewer.Common.dll 和 Microsoft.ReportViewer.webForms.dll 复制到本地 Web 文件夹。

  • \n
  • 在解决方案引用中,删除对旧 ReportViewer 版本的所有旧引用,删除 web.config 和其他文件中的引用,并从 ToolBox 中删除控件。

  • \n
  • 添加新的(通用和 Webforms)dll 引用。

  • \n
  • 将其属性设置为“复制本地”(复制到 bin 文件夹)。

  • \n
  • 右键单击“工具箱”并添加 ReportViewer 11 控件(添加 Microsoft.ReportViewer.webForms.dll 引用)

  • \n
  • 将控件拖放到页面上。

  • \n
  • 这将添加对 Web 配置文件和页面文件的引用。\n在程序集中:

    \n\n
    <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>\n<add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>\n
    Run Code Online (Sandbox Code Playgroud)
  • \n
  • 您还需要在 web.config 文件中添加 2 个额外条目:

  • \n
\n\n

在配置下,system.web,httphandlers:

\n\n
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />\n
Run Code Online (Sandbox Code Playgroud)\n\n

在配置下,system.webserver,处理程序:

\n\n
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />\n
Run Code Online (Sandbox Code Playgroud)\n\n

注意:\n这对我有用,无需在 Application_BeginRequest 方法中添加任何内容。\n此外,我尝试了使用和不使用兼容性元标记,并且它以两种方式工作。

\n\n

\n