问题
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
This error is coming . I have already mentioned this line in http handler but still getting this error
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=0000000000000000" validate="false" />
my html page markup is as follow
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, 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 config assemblies section is as follows :
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
回答1:
I was having the very same problem. What happened was I put the Report loading routine on Page_Load, and didn't wrap it in if (!IsPostBack). The ReportViewer makes a POST to the page, and that was triggering Page_Load and reloading the report, somehow messing it up. After putting everything inside if (!IsPostBack), it worked like a charm.
回答2:
Could you check your web.config for handlers registered or not for ReportViewer. its should be like this
Handler
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
Also check assembly section in your web.config for ReportViewer, it should be like below.
<assemblies>
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
回答3:
The issue also went away for me when I changed the app pool from Integrated to Classic.
回答4:
This issue arose for me after I changed the parameter of the stored procedure my query was calling without refreshing the dataset in the SSRS designer, so you could try this.
回答5:
The last two days I have had the same issue. This is not really an answer to the original question - just some additional information for those having the same problem.
The application I had the problem with has been developed in 2005 and is under development still.
So it has been ported from VS 2005 to VS 2008 to VS 2010 and lately to VS 2013. It seems this is when the error happened. Somewhere in between the .NET framework has switched from .NET 3.5 to .NET 4.
I think (I did not verify) that with .NET 4 the report viewer *.dlls come as system libraries. Anyway this showed my GAC to me:
Only the first one, version 8, has been manually installed by myself (with the Reporting Viewer 2005 redistributable binary).
So in VS 2013, Resharper is thinking of version 11 and automatically changes those lines in web.config
<httpHandlers>
<!-- this is the correct one (if using Report Viewer 2005 / 8.0.0.0 -->
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
</httpHandlers>
<httpHandlers>
<!-- this is the wrong one inserted during the update (or maybe Resharper) -->
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
So long story short: It seems - at least in my case - this error points to a version conflict with the libraries used with visual studio and those used an runtime. The error given from Microsoft is a little bit misleading.
回答6:
I have not changed anything in the app pool just added this line:
<Add name = "Reserved-ReportViewerWebControl-axd" path = "Reserved.ReportViewerWebControl.axd" verb = "*" type = "Microsoft.Reporting.WebForms.HttpHandler" resourceType = "Unspecified" />
回答7:
We were getting this exact same error from the Report Viewer web control when we upgraded to SSRS 2016. But we also could not access the SSRS Web Portal - we were getting a 503 error which led us here: https://support.microsoft.com/en-gb/help/3171040/-http-503-service-unavailable-error-when-you-open-the-ssrs-web-portal-after-you-upgrade-to-ssrs-2016
Once we installed SQL Server 2016 Service Pack 1 everything worked.
回答8:
If you're using WCF Services for retrieving data form the database, you might face this issue even if you've added the HTTP handler to your web.config file.
In this case you also have to add the service endpoints, behaviors and bindings to the web.config to make things work.
回答9:
In my case, following line solved the problem for me :
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</handlers>
</system.webServer>
回答10:
For IIS 7 or later
<system.webServer>
<handlers>
<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" />
</handlers>
</system.webServer>
回答11:
I don't have enough rep to comment on the existing answers, but the reason why may need to change your app pool from Integrated to Classic is because of this MSDN entry
With an Integrated app pool you only need the handlers part, with a Classic app pool you need both handlers and httpHandlers.
来源:https://stackoverflow.com/questions/12488845/the-report-viewer-web-control-http-handler-has-not-been-registered-in-the-applic