我使用asp.net mvc 2,添加了带有reportviewer控件的webform。
web.config 文件看起来
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting`enter code here`.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b0`enter code here`3f5f7f11d50a3a" />
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<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 name="Reserved.ReportViewerWebControl.axd" path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode" />
IIS 配置为链接
http://otkfounder.blogspot.com/2007/11/solving-reportviewer-rendering-issue-on.html
但我仍然有错误
报告查看器配置错误
报告查看器 Web 控制 HTTP 处理程序尚未在应用程序的 web.config 文件中注册。添加 <add verb=" " path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 到web.config 文件的 system.web/httpHandlers 部分,或添加 <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" /> 到系统。