24
    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>
Viral Shah
  • 2,263
  • 5
  • 21
  • 36
rahularyansharma
  • 11,156
  • 18
  • 79
  • 135

14 Answers14

12

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.

11

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

Mayank Pathak
  • 3,621
  • 5
  • 39
  • 67
7

The issue also went away for me when I changed the app pool from Integrated to Classic.

Sean
  • 71
  • 1
  • 1
  • I tried and checked all the above but still the issue persists.:( anything else – Richa Mar 03 '15 at 10:28
  • In my case, I changed the app pool from Classic to Integrated and that solved my problem. Any way, thanks I tried this because your comment. – Rolando Retana Oct 14 '15 at 21:51
  • 2
    This worked for me but I would like to know why? The only difference between the two modes is how they are integrated and consequently the application can start up asynchronicly (meaning no initial request is needed to trigger an app start). But this does not explain why the report viewer cotnrol needs Classic mode (version 11.0.0.0 at least) – verbedr Feb 17 '17 at 09:51
  • I can't edit my own comment so ... I got some digging into the msdn doc [link](https://msdn.microsoft.com/en-us/library/ms251661.aspx) and it seems you may not forget to add the handler in the system.webServer/httpHandlers section. Alongside the httpHandler in the system.web section. – verbedr Feb 17 '17 at 10:05
  • 1
    "It worked with me also." (A anonymous user's comment) – hynekcer Oct 30 '17 at 13:36
  • 1
    this is the kind of obscure fix I love Stack Overflow for! – Matthew Lock Feb 08 '18 at 07:34
2

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.

dellyjm
  • 426
  • 1
  • 5
  • 10
1

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:

enter image description here

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.

Martin Meeser
  • 2,784
  • 2
  • 28
  • 41
  • I had the same issue upgrading from vs 2008 to vs 2013, even without changing the .net version. I resolved it in a similar way, by updating the version numbers in: assemblies (ReportViewer.WebForms, ReportViewer.Common), buildProviders for extension .rdlc, and in the httpHandlers for the ReportViewerWebControl path – alexanderbird May 28 '15 at 17:45
1

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.

Fletch
  • 769
  • 1
  • 12
  • 33
  • I have tried all advices mentioned above, but yours has solved my issue. Cheers! – SHS Sep 17 '20 at 06:57
1

The same issue for me. The issue also went away for me 1)when I changed the app pool from Integrated to Classic. 2) change HTTP handler like this

<httpHandlers>
 <add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"   validate="false" />
    </httpHandlers>
Qfriend
  • 31
  • 5
0

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" />
Gabriel Simas
  • 567
  • 9
  • 15
0

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.

Ben
  • 1
  • 2
0

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.

Talha Imam
  • 1,046
  • 1
  • 20
  • 22
0

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>
Usman Khalid
  • 3,032
  • 9
  • 41
  • 66
0

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>
mzonerz
  • 1,220
  • 15
  • 22
0

In my case, It was resolved by adding the below lines just next to <system.web> in the web.config

<system.webServer>
      <handlers>
      <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
      </handlers>
</system.webServer>
Haseeb
  • 746
  • 7
  • 22
0

The issue was I was using IIS 7 or above on my server. The issue got resolved as I added this section to my code.

 <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true"/>
    <handlers>
        <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> 
    </handlers>
  </system.webServer>
Viral Parmar
  • 112
  • 1
  • 3