Crystal Reports Images and ASP.Net MVC

后端 未结 5 545
北海茫月
北海茫月 2021-01-06 03:09

I am having trouble with Crystal Reports when using charts and images which use CrystalImageHandler.aspx. The image cannot display and I suspect this is due to a problem wit

5条回答
  •  不思量自难忘°
    2021-01-06 03:39

    Figured it out. The routing was interfering with the CrystalImageHandler.aspx link that was being generated. Global.aspx has the following line to tell the routing engine to ignore resource files:

    routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
    

    but this isn't a conventional resource file, it's an aspx file for some reason (anyone know why?)

    adding this fixed it:

      routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
    

提交回复
热议问题