报告查看器配置错误

时间:2012-05-09 09:40:27

标签: sharepoint reportviewer

我想在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中吗?我应该在哪里添加这个?

3 个答案:

答案 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)

谢谢。 我使用godaddy和共享主机,这个解决方案非常适合我的申请。

<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>