【发布时间】:2012-07-10 17:53:16
【问题描述】:
当我检查网页的查看源代码时,我发现了以下错误消息,但网页工作正常。我们的测试主管在执行断言测试时发现了错误。
报告查看器配置错误:
报表查看器 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" />Internet Information Services 7 或更高版本的 system.webServer/handlers 部分
为什么在查看源代码中出现此错误消息..
注意:此错误消息周围有一个 div 标签,其 style="display:none"
我试图找出原因,但每个人都只讨论了这个错误消息,因为它是在网页中抛出的。建议对 web.config 进行的更改已经存在于我们的配置文件中。
【问题讨论】:
-
您是否在 IIS6 上运行?那是 IIS 7 配置。
标签: c# reportviewer