加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – IIS 7.5上的ReportViewer 10.0无法呈现

发布时间:2020-12-16 10:00:05 所属栏目:asp.Net 来源:网络整理
导读:我们正在尝试将报表从Visual 2008转移到Visual 2010,但我们无法在IIS 7.5计算机上使ASP.NET ReportViewer控件工作.操作系统是 Windows 7. 我们已将所有引用移至代码和配置文件中的Microsoft.Reporting.WebForms 10.0.我们的Web.config文件是关于ReportViewer
我们正在尝试将报表从Visual 2008转移到Visual 2010,但我们无法在IIS 7.5计算机上使ASP.NET ReportViewer控件工作.操作系统是 Windows 7.

我们已将所有引用移至代码和配置文件中的Microsoft.Reporting.WebForms 10.0.我们的Web.config文件是关于ReportViewer的以下部分:

<system.web>
    <httpHandlers>
      <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler,Microsoft.ReportViewer.WebForms,Version=10.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
        validate="false" />
    </httpHandlers>
    <hostingEnvironment shutdownTimeout="30" shadowCopyBinAssemblies="false" />
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="Microsoft.ReportViewer.WebForms,PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="Microsoft.ReportViewer.Common,PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="Microsoft.Build.Framework,Version=4.0.0.0,PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Management,PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="CrystalDecisions.Web,Version=10.5.3700.0,PublicKeyToken=692FBEA5521E1304"/>
        <add assembly="CrystalDecisions.Shared,PublicKeyToken=692FBEA5521E1304"/>
        <add assembly="CrystalDecisions.ReportSource,PublicKeyToken=692FBEA5521E1304"/>
        <add assembly="CrystalDecisions.CrystalReports.Engine,PublicKeyToken=692FBEA5521E1304"/>
      </assemblies>
      <buildProviders>
        <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider,PublicKeyToken=b03f5f7f11d50a3a" />
       </buildProviders>
    </compilation>
    <authentication mode="Windows" />
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
    <httpRuntime requestValidationMode="2.0" />
  </system.web>

  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler,PublicKeyToken=b03f5f7f11d50a3a" />
      <add verb="GET" name ="CrystalImageHandler" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler,CrystalDecisions.Web,PublicKeyToken=692fbea5521e1304"/>
    </handlers>
    <security>
      <requestFiltering>
        <requestLimits  maxAllowedContentLength="4294967295" />
      </requestFiltering>
    </security>
  </system.webServer>

加载包含ReportViewer控件的aspx时,我们只看到Report Viewer的工具栏,而页面的其余部分为空白.该页面的源代码说明如下:

The Report Viewer Web Control HTTP
Handler has not been registered in the
application’s web.config file. Add
to
the system.web/httpHandlers section of
the web.config file,or add to
the system.webServer/handlers section
for Internet Information Services 7 or
later.

我们知道ReportViewer 10.0在经典模式下不起作用,因此应用程序池配置为集成.我们尝试从system.web中删除handle部分,但没有运气.

任何人都可以告诉我们如何使用IIS 7.5上的Report Viewer 10.0获得ASP.NET应用程序的工作配置?

提前谢谢了.

何塞安东尼奥阿罗巴

解决方法

当我们将网页从IIS6.0移动到IIS7.5时,我们遇到了类似的问题,我们不得不移动我们的httpH andler以查看下面的代码示例

<defaultDocument>

  <files>
    <add value="home.aspx" />
  </files>

</defaultDocument>

<modules>
  <add name="AccessDeniedModule" type="Senate.Leagis.Web.Common.Handlers.AccessDeniedModule,Senate.Leagis.Web,PublicKeyToken=132b49799d170825" />
</modules>

<handlers>
  <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler,Version=9.0.0.0,PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读