Report Viewer Web Control Version 10 Gives Error Despite Set Up Correctly
Asked Answered
R

3

11

Reports are deployed and working, verified in Report Manager.

My application is an MVC2 app with my report on its own aspx page. This page worked with version 8 of the report viewer control, but we moved to new servers, upgraded sql server, and are trying to update our website to match.

The servers are Windows Server 2008 with IIS 7.5.

I am testing in both chrome and IE 9.

Despite my best efforts, I still get this error:

Report Viewer Configuration Error

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=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> to the system.web/httpHandlers section of the web.config file, or add <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" /> to the system.webServer/handlers section for Internet Information Services 7 or later.

But, I've already done this. in fact, I even read this from MSDN:

To use IIS 7.0 in Integrated mode, you must remove the HTTP handler in system.web/httpHandlers. Otherwise, IIS will not run the application, but will display an error message instead.

Just to be safe, I tried a combo of neither while adding the handler into IIS directly, just the web server http handler in my config, just the http handler in my config, and both.

Let's start with my web.config

<configuration
  <system.web>
    <httpRuntime maxQueryStringLength="4096" />
    <compilation targetFramework="4.0">
      <assemblies>
        <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <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" />
      </assemblies>
        <buildProviders>
            <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        </buildProviders>
    </compilation>
  </system.web>
  <system.webServer>
    <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>
  </system.webServer>
</configuration>

I have the assemblies, the build provider, and the handler. What else could be wrong?

Rijeka answered 21/11, 2011 at 17:52 Comment(0)
S
6

I found a quick and dirty workaround - to your web config add this:

<location path="Reserved.ReportViewerWebControl.axd">
  <system.web>
    <authorization>
      <allow users="*" />
    </authorization>
  </system.web>
</location>

I saw in fiddler that for some reason when page requested Reserved.ReportViewerWebControl.axd instead of getting HTTP 200 response server would send 302 - moved to login.aspx?returnurl="Reserved.ReportViewerWebControl.axd. So allowing all users to the handler path solves the problem.

Sea answered 21/11, 2011 at 17:52 Comment(4)
missed a key word there... i'm hoping josh will confirm this works! :)Fountain
I can't confirm that this solution works. I ended up stripping the SSRS controls out of my application and made my own html version of them. If anyone else has the same problem and tries this, can you comment on your results?Rijeka
Worked for me. Although the solution used to work without this so not sure what changed.Hultgren
This did it for me as well. Can anyone explain what's going on? I didn't change my solution either.Puparium
T
1

I thought its ReportViewer Rendering Issue on IIS7 I have manually mapped my reportviewer handle to IIS7 like this:

•Open Internet Information Services (IIS) Manager and select your Web application.

•Under IIS area, double-click on Handler Mappings icon.

•At the Action pane on your right, click on Add Managed Handler.

•At the Add Managed Handler dialog, enter the following:

Request path: Reserved.ReportViewerWebControl.axd

Type: Microsoft.Reporting.WebForms.HttpHandler

Name: Reserved-ReportViewerWebControl-axd

•Click OK.

also changed by web config by adding


Still mine's not working. I thought the above solution would help others.

Trig answered 23/1, 2013 at 12:15 Comment(1)
Yep, this fixed it for me (IIS7, Server 2008)Sowder
T
-1

I have tries this by removing unwanted mvc assemblies from asp.net project. So the simple solution was to remove WebMatrix.*.dll from Bin folder in web project as that belongs to mvc framework.

Trig answered 23/1, 2013 at 15:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.