views:

186

answers:

1

I am unable to show images in CR reports. I'm developing a MVC 2 project in VS 2008 with Crystal Reports that comes with it (10.5). Everything works fine, except for images. I can see them in the preview mode within the CR designer, but not when the app is deployed, which means I am loading data OK but something's wrong with IIS and/or routing.

When running the app, images appear with the red cross and if I navigate to the following url directly I get a 404 error.

http://localhost:1234/CrystalImageHandler.aspx

I think my problem is similar to the one here but that workaround doesn't seem to work for me.

I should also comment that I'm using the Areas feature within MVC.

EDIT: Forgot to add: When exporting the report to PDF the images are shown ok.

+1  A: 

I don't know much about crystal reports, but is there an Http Handler? If there is and you are running IIS 7 on the live server, is the handler registered in the web.config under both system.web/httpHandlers and under system.webServer/handlers?

I forget to register the handlers under system.webServer/handlers for our IIS 7 server sometimes and we were having a similar issue with the Microsoft Charting Controls.

Joshua Dale
Thanks! That was the problem. I thought I had everything correct in my web.config but it was lacking the HttpHandler for the CrystalImageHandler. I also got help from this: http://msdn.microsoft.com/es-es/library/ms227537.aspx
Gabe G