Crystal Reports Images not loading in ASP.NET MVC(Crystal Reports 图像未在 ASP.NET MVC 中加载)
问题描述
我在 MVC 应用程序内的 Web 表单中使用 Crystal Reports.但是,在 ASP.NET 开发服务器和 IIS 7(在 Win7x64 上)上都不会显示报告中的图像.
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).
我从许多其他类似的问题中知道 CrystalImageHandler HTTP 处理程序负责渲染图像,但我尝试了所有常用的解决方案都无济于事.
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.
到目前为止,我已经
在我的
appSettings
中添加了以下内容(通过 http://www.mail-archive.com/bdotnet@groups.msn.com/msg26882.html)
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"/>
将以下 httpHandler 添加到 system.web/httpHandlers
(通过 https://stackoverflow.com/questions/2253682/crystal-report-viewer-control-isnt-loading-the-images-inside-the-report)
Added the following httpHandler to system.web/httpHandlers
(via https://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"/>
在我的 Global.asax.cs 中添加了以下内容(通过 Crystal Reports 图片和 ASP.Net MVC)routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
Added the following to my Global.asax.cs (via Crystal Reports Images and ASP.Net MVC)
routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
和routes.IgnoreRoute("CrystalImageHandler.aspx");
关于为什么图像仍然是 404 的任何想法?
Any ideas as to why the images still 404?
推荐答案
我也遇到了类似的问题.这对我有帮助.
I had similar problem. This helped me.
routes.IgnoreRoute("{*allaspx}", new { allaspx = @".*(CrystalImageHandler).*" });
这篇关于Crystal Reports 图像未在 ASP.NET MVC 中加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Crystal Reports 图像未在 ASP.NET MVC 中加载
基础教程推荐
- 如何激活MC67中的红灯 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- c# Math.Sqrt 实现 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01