如何解决“未在应用程序的web.config文件中注册Report Viewer Web控件HTTP处理程序”

问题描述 投票:0回答:1

[使用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
asp.net reporting-services web-config
1个回答
0
投票

解决方案是双重的。

首先,将错误消息中的行添加到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"/>
© www.soinside.com 2019 - 2024. All rights reserved.