views:

19

answers:

1

I have a ASP.NET web app that utilizes ReportViewer to show local reports. Everything works beautifully on my development machine (XP Pro, Visual Studio 2008). When I deploy the app to the production server (Windows Server 2008, IIS 7), the site works very well, except for the report viewer. When I generate the report, the report viewer remains empty.

I have written debugging code to verify that the records are being received from the database, and they are. No error occurs but, no records are show in the report viewer. Also, the images that normally appear in the menu bar of the ReportViewer control (export button, print button, forward and back buttons, etc) do not load either.

I ran the ReportViewer.exe on the server to install the appropriate files, and I have verified that they are in the GAC of the machine.

Can anyone suggest a way to debug this...it would be easier if an error was being generated (I can't believe I just said that)?

Thanks in advance for whatever advice you can give.

+1  A: 

Please verify that you have the required web.config entries. My suspicion is that you are missing the entry in system.webServer/handlers, which is required in IIS7. IIS7 pretty much ignores the system.web/httpHandlers section, which may explain why it works in IIS 5.1 (XP) but not in 7.

Version numbers may vary, but this should cover it for entries:

In the system.web/compilation section:

  <buildProviders>
    <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  </buildProviders>

In the system.web/httpHandlers section

  <add path="Reserved.ReportViewerWebControl.axd"
       verb="*"
       type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
       validate="false" />

And in the system.webServer/handlers section:

  <add name="ReportViewer"
       path="Reserved.ReportViewerWebControl.axd"
       verb="*"
       type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
       preCondition="integratedMode" />
kbrimington
You are exactly right about the web.config entries. The entry in the system.webServer/handlers section was missing. My development machine uses IIS 6 and the deployment machine uses IIS 7, which looks for the settings in a different place in the config file. Thank you for your quick, and accurate response. Also: I found this article after posting: http://blogs.msdn.com/b/webtopics/archive/2009/02/10/report-viewer-toolbar-does-not-render-properly-on-iis-7-0.aspx
rogdawg

related questions