我想在SharePoint中显示报表。我的ASPX页面包含一个Microsoft.ReportViewer.WebForms.ReportViewer
控件。当我尝试打开此页面时,出现错误:
报告查看器配置错误
报表查看器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部分。
尝试连接到报表服务器失败。检查您的连接信息,并且报表服务器是兼容版本。
客户发现'text / html的响应内容类型; charset = utf-8',但预计'text / xml'。请求失败并显示错误消息: - 401 UNAUTHORIZED< RSError xmlns =“http://www.microsoft.com/sql/reportingservices”>< MoreInformation>< Message> Unbekannter Fehler beim Reporting Services-Endpunktfürdiese SharePoint的网站。 Wenden Sie sich an den Administrator der SharePoint-Website。< / Message>< / MoreInformation>< / RSError> -
我确实需要将此部分添加到web.config中吗?我应该在哪里添加这个?
答案 0 :(得分:4)
尝试添加以下部分
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
在system.web
部分中到handlers
并添加以下部分
<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" />
在system.webserver
部分中到handlers
实际上错误信息解释了一切!希望它有所帮助。
答案 1 :(得分:1)
解决此问题后,这是完整的web.config:
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<httpHandlers>
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</httpHandlers>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<defaultDocument>
<files>
<add value="PreviewReport.aspx" />
</files>
</defaultDocument>
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</handlers>
</system.webServer>
</configuration>
答案 2 :(得分:1)
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<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" />
</handlers>
</system.webServer>