水晶报表图像不能在ASP.NET MVC中加载 [英] Crystal Reports Images not loading in ASP.NET MVC

查看:159
本文介绍了水晶报表图像不能在ASP.NET MVC中加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MVC应用程序中的Webform中使用Crystal Reports。但是,在ASP.NET开发服务器和IIS 7(在Win7x64上)中,不会显示报告中的图像。



我从一些其他类似的问题知道,CrystalImageHandler HTTP处理程序负责渲染图像,但我已经尝试所有常见的解决方案可用。



到目前为止,我有


  1. appSettings (通过 http://www.mail-archive.com/bdotnet@groups.msn.com/msg26882.html



    < add key =CrystalImageCleaner-AutoStartvalue =true/>



    < add key =CrystalImageCleaner-Sleepvalue =60000/>



    < add key =CrystalImageCleaner -Agevalue =120000/>


  2. 添加以下httpHandler到 system.web / httpHandlers (通过 http://stackoverflow.com/questions/2253682/ crystal-report-viewer-control-isnt-loading-the-images-inside-the-report



    < add verb =GETpath =CrystalImageHandler.aspxtype =CrystalDecisions.Web.CrystalImageHandler,CrystalDecisions.Web,Version = 12.0.2000.0,Culture = neutral,PublicKeyToken = 692fbea5521e1304/> / p>


  3. 将以下内容添加到Global.asax.cs中(通过 routes.IgnoreRoute({resource} .aspx / {* pathInfo}) );



routes.IgnoreRoute (CrystalImageHandler.aspx);



有关为什么图片仍然为404的任何想法?

解决方案

我有类似的问题。这有助于我。

  routes.IgnoreRoute({* allaspx},new {allaspx = @。*(CrystalImageHandler) 。*}); 


I'm using Crystal Reports in a Webform inside of an MVC application. Images in the reports are not being displayed, however, on both the ASP.NET Development Server and IIS 7 (on Win7x64).

I know from a number of other questions similar to this that the CrystalImageHandler HTTP Handler is responsible for rendering the image, but I've tried all of the usual solutions to no avail.

So far, I have

  1. Added the following to my appSettings (via http://www.mail-archive.com/bdotnet@groups.msn.com/msg26882.html)

    <add key="CrystalImageCleaner-AutoStart" value="true" />

    <add key="CrystalImageCleaner-Sleep" value="60000" />

    <add key="CrystalImageCleaner-Age" value="120000" />

  2. Added the following httpHandler to system.web/httpHandlers (via http://stackoverflow.com/questions/2253682/crystal-report-viewer-control-isnt-loading-the-images-inside-the-report)

    <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>

  3. Added the following to my Global.asax.cs (via Crystal Reports Images and ASP.Net MVC) routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");

and routes.IgnoreRoute("CrystalImageHandler.aspx");

Any ideas as to why the images still 404?

解决方案

I had similar problem. This helped me.

routes.IgnoreRoute("{*allaspx}", new { allaspx = @".*(CrystalImageHandler).*" });

这篇关于水晶报表图像不能在ASP.NET MVC中加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆