CrystalImageHandler.aspx未找到 [英] CrystalImageHandler.aspx not found

查看:1142
本文介绍了CrystalImageHandler.aspx未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Crystal报表正常ASP.NET aspx页面上的观众在MVC3应用程序。在控制器的行动,我只是重定向到aspx页面和报告显示的罚款。但问题是动态图像。我已经找到了这个和这个最简单的解决方案,通过图像路径作为报表参数和设置该参数为图像源。在Visual Studio preVIEW这工作得很好,但在执行时,我在页面上看到这个错误。

I am using Crystal reports viewer on a normal ASP.NET aspx page in an MVC3 application. In a controller action I am simply redirecting to the aspx page and the report shows fine. But the problem is with dynamic images. I have found the simplest solution for this and this to pass the image path as a report parameter and set this parameter as image source. In Visual Studio preview this works fine but when executing I see this error on the page.

NetworkError:404未找​​到 -
  server/ReportWebForms/CrystalImageHandler.aspx?dynamicimage=cr_tmp_image_4fbcb73a-e001-4365-84fc-164788dd1605.png\"

"NetworkError: 404 Not Found - server/ReportWebForms/CrystalImageHandler.aspx?dynamicimage=cr_tmp_image_4fbcb73a-e001-4365-84fc-164788dd1605.png"

所以,我认为,具有水晶报表没有previous的经验,这个问题是在CrystalImageHandler.aspx。
我在Web.config这些条目:

So I assume, having no previous experience with crystal reports, that the problem is in CrystalImageHandler.aspx. I have these entries in the Web.config:

  <httpHandlers><add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/></httpHandlers></system.web>
  <handlers><add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/></handlers></system.webServer>

这是一个MVC类型的问题?任何人都可以在这方面帮助吗?

Is this an MVC type of a problem? Can anyone help with this please?

感谢您

推荐答案

我有同样的问题,但幸运的是我有Crystal Reports的一些经验。

I had the same problem, but fortunately I have some experience with Crystal Reports.

您只需要改变的Web.config,因为路径属性设置为站点根目录。
它将如果你打开​​浏览器的网址从它的工作,并删除在 ReportWebForms

You just need to change the Web.config, because the "path" attribute is set to site root. It will work if you open the url in browser and remove the ReportWebForms from it.

其实我刚刚添加2更多配置行:

Actually I've just added 2 more lines of configuration:

<system.web>
    <httpHandlers>
      <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
      <!-- Added -->
      <add verb="GET" path="Reports/CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
      <add verb="GET,HEAD" path="asset.axd" validate="false" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc" />
    </httpHandlers>
</system.web>

<system.webServer>
    <handlers>
      <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
      <add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode" />
      <!-- Added -->
      <add name="CrystalImageHandler.aspx_GETR" verb="GET" path="Reports/CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode" />
      <remove name="asset" />
      <add name="asset" preCondition="integratedMode" verb="GET,HEAD" path="asset.axd" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc" />
    </handlers>
</system.webServer>

最后,你必须添加一个无视规则MVC应用程序的路径:

And finally you have to add an ignore rule the route for MVC application:

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
// Here is added new ignore rule
routes.IgnoreRoute("Reports/{resource}.aspx/{*pathInfo}");

在我来说,我有一个文件夹命名为报告其中.aspx文件被放置。我想你应该在你的情况下,将其更改为 ReportWebForms

In my case I have a folder named Reports where the .aspx file is placed. I guess you should change this to ReportWebForms in your case.

这篇关于CrystalImageHandler.aspx未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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