Microsoft Report Viewer版本11

时间:2014-10-06 22:35:11

标签: c# report version viewer

我正在创建Microsoft Report Viewer Version 11,在本地运行良好,但在上传到服务器时,我发现以下错误。

报告查看器配置错误

报表查看器Web控件HTTP处理程序尚未在应用程序的web.config文件中注册。添加到web.config文件的system.web / httpHandlers部分,或添加到Internet Information Services 7或更高版本的system.webServer / handlers部分。

这是我的web.config`

<?xml version="1.0"?>

  <system.web>
    <httpHandlers>
      <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
        validate="false" />
    </httpHandlers>
    <customErrors mode="Off"/>
    <compilation targetFramework="4.0">
      <assemblies>
        <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
        <add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
        <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
      </assemblies>
      <buildProviders>
        <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
      </buildProviders>
    </compilation>
    <pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID"/>
  </system.web>
  <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=11.0.0.0,
 Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
    </handlers>
  </system.webServer>
</configuration>

1 个答案:

答案 0 :(得分:0)

您的配置设置不正确。 &#34;名称&#34;属性缺少处理程序部分。请改用它。

<add name="Microsoft.Reporting.WebForms" path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>