[使用ASP.NET应用程序时,尝试使用Microsoft ReportViewer控件查看页面时收到以下错误:
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
解决方案是双重的。
首先,将错误消息中的行添加到system.webServer \ handers部分中的web.config:
<system.webServer>
<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>
</system.webServer>
第二,将此行添加到system.webServer部分:
<validation validateIntegratedModeConfiguration="false"/>