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" />
<%@ 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>