ReportViewer 10.0 on IIS 7.5 not rendering - asp.net

We are trying to move our reports from Visual 2008 to Visual 2010, but we are not being capable of making ASP.NET ReportViewer control work on our IIS 7.5 machines. The OS is Windows 7.
We have moved all our refernces to Microsoft.Reporting.WebForms 10.0 in code and in config files as well. Our Web.config file is the following sections regarding ReportViewer:
<system.web>
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
validate="false" />
</httpHandlers>
<hostingEnvironment shutdownTimeout="30" shadowCopyBinAssemblies="false" />
<compilation debug="true" targetFramework="4.0">
<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" />
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
</assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</buildProviders>
</compilation>
<authentication mode="Windows" />
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
<httpRuntime requestValidationMode="2.0" />
</system.web>
<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=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="GET" name ="CrystalImageHandler" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</handlers>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="4294967295" />
</requestFiltering>
</security>
</system.webServer>
When loading the aspx which contains the ReportViewer control we see only the toolbar of the Report Viewer and the rest of the page is blank. The source code of that page tells the following:
The Report Viewer Web Control HTTP
Handler has not been registered in the
application's web.config file. Add
to
the system.web/httpHandlers section of
the web.config file, or add to
the system.webServer/handlers section
for Internet Information Services 7 or
later.
We know that ReportViewer 10.0 does not work in classic mode and so the application pool is configured to be Integrated. We have tried removing the handles section from the system.web but with no luck.
Anyone could give us a clue of how to get a working configuration of an ASP.NET app with Report Viewer 10.0 over IIS 7.5?
Many thanks in advance.
Jose Antonio Arroba

We had a similar problem when moving our web page from IIS6.0 to IIS7.5 we had to move our httpH andlers from to see code sample below
<defaultDocument>
<files>
<add value="home.aspx" />
</files>
</defaultDocument>
<modules>
<add name="AccessDeniedModule" type="Senate.Leagis.Web.Common.Handlers.AccessDeniedModule, Senate.Leagis.Web, Culture=neutral, PublicKeyToken=132b49799d170825" />
</modules>
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>

Had the same issue this morning. It looks like your web.config handlers are fine. Hint: if you need to know they are not fine, try viewing with chrome. It tended to show me error messages IE wasn't. Anyways, I solved my problem by adding an HTTP-Handler to my IIS7.5 In IIS manager, go to Handler Mappings and register the handler. Request Path:Reserved.ReportViewerWebControl.axd, Type select the correct version, click on Request Restrictions and specify "One of the following verbs" as GET,HEAD,POST,DEBUG
You might find the ending part of here useful

Try to add
<configuration>
<system.webServer>
<handlers>
<add name="Reserved-ReportViewerWebControl-axd" path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler" resourceType="Unspecified" />
.......
in web.config
Source

Related

How to resolve "The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file"

When working with an ASP.NET application, you receive the following error when attempting to view a page with the Microsoft ReportViewer control:
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
The solution has two steps.
Find the "system.webServer" section of the web.config and add the following lines to the "handlers" section. If your web.config doesn't have a "handlers" section, add it along with the new lines:
<system.webServer>
<handlers>
<!-- Add these lines -->
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<validation validateIntegratedModeConfiguration="false"/>
</handlers>
</system.webServer>
Then, Find the "system.web" section of the web.config and add the following lines to the "httpHandlers" section.
<system.web>
<httpHandlers>
<!-- Add this line -->
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpHandlers>
<system.web>

ReportViewer not working on web server

Over the last month, I developed a WebForm app in C# with VS2013. It is working perfectly when I debug it and almost perfectly too once published on my iis 7.5 server on a App Pool using .NET Framework v4.030319. The problem is that the report viewer control doesn't work, exactly like this blog:
http://blogs.msdn.com/b/webtopics/archive/2009/02/10/report-viewer-toolbar-does-not-render-properly-on-iis-7-0.aspx
or the 49 other blogs I have read in the last 4 days... I tried every solution suggested and none of them worked. I am 100% sure it's not due to my report because just for testing, I created a basic report (just a textbox, no parameters, no datasource) and a new project with one page that load this report and I got the same problem.
Here is the concerned code in the web.config file:
<system.web>
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" validate="false" />
</httpHandlers>
<authentication mode="None" />
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
<add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
</assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</buildProviders>
</compilation>
<httpRuntime targetFramework="4.5" />
[...]
</system.web>
<system.webServer>
<modules>
<remove name="FormsAuthentication" />
</modules>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<add name="ReportViewerWebControl" 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>
And yes, I the mapping is also created on the server. Can someone help me fix this problem. I'm a little distraught.
I finally resolved it by installing the followings on the server:
dotNetFx45
ReportViewer 2010 Redistributable
Microsoft Microsoft System CLR Types for SQL Server 2012
ReportViewer 2012 Runtime
and restart it after even if it's not asked. After that, the reports were displaying properly. The fact that I didn't get any error messages wasn't helping very much. Also, the server is on prod so I couldn't restart it every time I want. Anyway, it's working now and that's the only thing that matters. Thanks.
For me these 2 mentioned below and no server restart worked
ReportViewer 2010 Redistributable
ReportViewer 2012 Runtime
Thanks

ASP.Net URL Routing only works when `runAllManagedModulesForAllRequests` is true

I have set up URL Routing in IIS. When I have the runAllManagedModulesForAllRequests set to true, the URL routing works.
With the following web.config (and runAllManagedModuesForAllRequests set to false) I get a 404:
<system.web>
<compilation defaultLanguage="c#" debug="true" targetFramework="4.5">
<assemblies>
<add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<remove name="UrlRoutingHandler" />
<add name="UrlRoutingHandler"
preCondition="integratedMode"
verb="*"
path="UrlRouting.axd"
type="System.Web.HttpForbiddenHandler,
System.Web, Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
<modules>
<remove name="UrlRoutingModule" />
<add name="UrlRoutingModule"
type="System.Web.Routing.UrlRoutingModule,
System.Web.Routing,
Version=3.5.0.0,
Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
</modules>
</system.webServer>
How do I set up URL Routing for only certain requests?
I have tested this configuration in IIS 7.5 and IIS 8. This is in a web forms application. All URLs demonstrate the 404 behavior.
"runAllManagedModulesForAllRequests" being true, means that the asp.net handler (of course when you are in integrated mode) will fire for all extensions (including extension-less), if you don't have aspx and it's set to false your module can't process it.
You can't setup for a subset of extensions for what you are trying to achieve, but you can in the module filter it yourself to only handle certain extensions.

The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file

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>
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.
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" />
The issue also went away for me when I changed the app pool from Integrated to Classic.
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.
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.
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.
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>
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" />
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.
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.
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>
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>
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>
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>

ASP.NET URL-rewriting works in Development Server but not in local IIS

I'm programming ASP.NET using visual studio 2010 and IIS 7.5
I have URL-rewriting in Global.asax (RouteTable.Routes.MapPageRoute). It works in Development Server but not in IIS.
Is there a configuration for this in IIS?
There's a webconfig for it... You don't need the remove/add part, that's just showing how you'd explicitly only include this module.
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<remove name="UrlRoutingModule" />
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<handlers>
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
</system.webServer>
system.web:
<httpModules>
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpModules>

Resources