加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 报表查看器Web控件HTTP处理程序尚未在应用程序的web.

发布时间:2020-12-15 23:29:57 所属栏目:asp.Net 来源:网络整理
导读:The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. Add add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler,Microsoft.ReportViewer.We
The Report Viewer Web Control HTTP Handler has not been registered in the application's 
web.config file.  Add <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = 
"Microsoft.Reporting.WebForms.HttpHandler,Microsoft.ReportViewer.WebForms,Version=9.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" /> to the system.web/httpHandlers section of the web.config file

这个错误即将到来.我已经在http处理程序中提到了这一行,但仍然收到此错误

<add path="Reserved.ReportViewerWebControl.axd" verb="*"   type="Microsoft.Reporting.WebForms.HttpHandler,Version=8.0.0.0,PublicKeyToken=0000000000000000" validate="false" />

我的html页面标记如下

<%@ Register Assembly="Microsoft.ReportViewer.WebForms,PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:Button ID="btnsubmit" runat="server" OnClick="GenerateReportButton_Click" />
    <rsweb:ReportViewer ID="ReportViewer1" runat="server">
    </rsweb:ReportViewer>
</asp:Content>

Web配置程序集部分如下:

<assemblies>
    <add assembly="System.Core,Version=3.5.0.0,PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Web.Extensions,PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Data.DataSetExtensions,PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Xml.Linq,PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Web.DataVisualization,PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Windows.Forms,Version=2.0.0.0,PublicKeyToken=B77A5C561934E089"/>
    <add assembly="Microsoft.ReportViewer.WebForms,PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="Microsoft.ReportViewer.Common,PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>

解决方法

我遇到了同样的问题.发生了什么事情是将报表加载例程放在Page_Load上,并没有将其包装到if(!IsPostBack)中. ReportViewer对页面进行了POST,这是触发Page_Load并重新加载报告,不知何故搞砸了.将所有内容放在if(!IsPostBack)之后,就像一个魅力一样.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读