Thursday, April 22, 2010

ASP.NET ReportViewer problems on IIS 7

today we were trying to move our application to IIS 7, and there were some pages using ReportViewer in local mode. we had some problems to make it working.
The first thing to consider is that IIS7 need a new web.config structure. you have to register your httpModules and httpHandlers under system.webServer element instead of system.web

1- register the handler in the web.config file under system.webServer element

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

2- make sure on the aspx page using ReportViewer control you have registered the correct version. it must be like this:

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>



Post a Comment