on 04-21-2014 7:50 PM
First off, let me say that I've read about 1,000 web pages on this subject. I'm sure one of them (or a combination of them) had my answer and I just did something wrong, but I can't figure this out. I'm hoping the wizards here can help me.
Using CR for VS 2013, my web reports are showing images with "X" placeholders.
As I said, I'm using VS 2013. Web Forms application. Windows 7. The problem happens with IIS Express and regular IIS. On both my workstation and a Windows 2012 server. All running 64 bit OS. I'm compiling for "Any CPU". I tried to compile for 64 bit, and got some strange runtime DLL issues (non-CR related), so obviously I don't know how to properly compile for 64 bit. But I doub't that's the problem anyway, since everything else works correctly (i.e, the reports display correctly, except for the images).
I've installed both the 32 and 64 bit runtimes. Uninstalled them, reinstalled them.
I ran ProcMon and found errors when certain Registry entries were accessed, created, whatever. I granted rights and those problems went away, but the image issue still exists.
The interesting thing is that I can see that the images are being created in the Temp folder. They're just not being displayed. There are ProcMon lines that mention something about temp file name collisions, but since the image files are getting created in the temp folder, I'm assuming this is normal.
Asumming this online editor allows me to post this without eating this entry (for the 10th time), here's the relevant portions of my web.config, with the angle-brackets replaced to protect the innocence of the editor:
[businessObjects]
[crystalReports]
[crystalReportViewer]
[!-- [add key="ResourceURI" value="~/crystalreportviewers13" /]--]
[add key="ResourceURI" value="/crystalreportviewers13" /]
[add key="documentView" value="weblayout" /]
[add key="EnableTextClipping" value="true" /]
[/crystalReportViewer]
[rptBuildProvider]
[add embedRptInResource="true" /]
[/rptBuildProvider]
[/crystalReports]
[/businessObjects]
[appSettings]
[add key="CrystalImageCleaner-AutoStart" value="true" /]
[add key="CrystalImageCleaner-Sleep" value="60000" /]
[add key="CrystalImageCleaner-Age" value="120000" /]
[/appSettings]
[system.web]
[compilation debug="true" targetFramework="4.5"]
[assemblies]
[add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /]
[add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /]
[add assembly="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /]
[add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /]
[add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /]
[add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /]
[add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /]
[add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /]
[/assemblies]
[/compilation]
[httpRuntime targetFramework="4.5" /]
[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]
[system.webServer]
[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,runtimeVersion4.0" /]
[!-- [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" /]--]
[/handlers]
Please, please, please, help!!! Thanks.
Dan Thomas
Hi Dan
Many thanks for the great description - wish they were all like it .
One thing I am assuming here, given that you are using VS 2013, is that the images show up as black X-es, rather then red X-es. The issue was originally described in this Discussion:
And here is a snap shot of what I see in one of my projects:
So, the black X-es are a known issue with VS 2013 when you compile using framework 4.5 or 4.5.1. The issue is not present when using frm 4.0.
We're working on identifying why this would be, but I don't have an ETA. Need to grab a bit of time and run Fiddler on this, see where the process is looking for the images.
I will update both this Discussion and , once I have something
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply.
You know, it's funny. I almost said "red X", then I thought, "you know, I don't think they were red". So yes, you're correct. They're black.
I'd be happy to do legwork for you if it will help. I'm relatively new to web stuff in general, but I learn quick. If it doesn't take up too much of your time, tell me what to do and I'll do it.
Thanks again.
Dan
Got a good chuckle out of the red x / black x thing. One thing that is constant; nothing is constant LOL.
I want to use the Fiddler utility to track the http requests - see if it will report 404 error or other errors when going after a certain (don't know which) http. Fiddler is a beast (I find anyhow), so if you want to try it be prepared. Umm, one thing. If and when we find out what's up with the http requests, it may be a simple web.config mod, or it may be something more complicated that only R&D can fix. And next Service Pack will not see the light of day until end of June / beginning of July (estimate only).
- Ludek
Didn't need to hear that last part. 😮
Fiddler and the logs show 404 errors on the files. I can't figure out how to tell where specifically it's looking for the files. Here's one of the Fiddler entries:
Request started: "GET" http://localhost:12074/Reports/CrystalImageHandler.aspx?dynamicimage=cr_tmp_image_7c5abcc9-b5be-4241...
ProcMon shows the files being created successfully, and I see them in the temp folder.
What else should I look for?
Hi Dan
I put an enormous amount of time into this and have not been able to find a solution, so I will be escalating this to R&D for a fix. I do know from Fiddler that the issue is related to the crystalimagehandler:
For some reason, the aspx is lost. Now I see it is lost here:
I don't understand why we have "Object moved":
<html><head><title>Object moved</title></head><body>
This does not happen when using framework 4.0.
I'll keep updating this Discussion as things develop.
- Ludek
First of all, many, many thanks for looking into this. It's not often we users get this kind of attention from big companies. I just wanted to make sure you knew I appreciated it.
Regarding the missing ".aspx" - good catch. I totally missed it even though it was staring me right in the face. I was wondering, could this have anything to do with the new "Friendly URLs" that Microsoft added? That's the thing that lets you not use ".aspx" in URLs. I think it even removes the ".aspx" sometimes, automatically. I wonder if this might be the default in 4.5, and perhaps that's what's happening? Just a guess.
I don't know enough about how they work to help debug this. But I thought I'd mention it just in case it triggered something in your mind.
Thanks again.
Dan
Ludek -
I have a temporary workaround to this problem. Here's what I did:
First off, I made a duplicate of the web.config <httpHandlers> entry for "CrystalImageHandler.aspx", and removed the ".aspx". So now there's 2 entries - one with ".aspx" and one without.
I did the same with the <handlers> entry for "CrystalImageHandler.aspx_GET". I copied the entry, and replaced ".aspx" with "" (it's in there twice).
I thought this would solve the problem, and I still think it should, but I had to do one more thing.
I disassembled your CrystalImageHandler class and copied it into a new class of my own. There's a couple of references to internal constants, so I copied them into my class also, so it would compile. Then I changed the web.config entries (mentioned above) to point to my new version of the handler.
Now everything works fine. I get images showing up in the viewer like they should.
I can't explain why I had to recompile your CrystalImageHandler class. I didn't change anything, other than copying the constant so it would compile. I still think I shouldn't have to do this, and maybe I don't - maybe I just missed something somewhere. In any case, it works.
What would you like me to do with this information? I could post the code for the CrystalImageHandler class, but I suspect that's a violation of some copyright or something. I could just give instructions for how to do it - basically post this in the other thread also.
Another option is I can rewrite the CrystalImageHandler class myself from scratch, now that I know what's going on. It's a small class and I could rewrite it easily, using the names and logic the way I would normally do something like this. It would be essentially the same - just in my own words. If that would get around any copyright issues.
Let me know what you want me to do.
Dan
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.