ASP.NET Chart Control errors in Event Viewer

给你一囗甜甜゛ 提交于 2019-12-08 05:14:18

I had the same error occur whenever users tried to copy or drag a chart from IE to a Word document. By default the server deletes chart images immediately after they've been delivered to the user's browser, and IE doesn't seem to copy the cached image data. I'm not sure of the mechanics behind it, but on either the copy or the paste, the image has to be fetched from the server again. The problem was resolved by changing the entry in web.config to:

<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;deleteAfterServicing=false;" />

Are you running this in a native IIS7 site, or an IIS7 site running in ASP.NET 2.0 compatibility mode?

It's possible that IIS is just being a bit verbose with it's logging, or logging that there's an issue, and then falling back to a legacy support type mode - the .axd files are virtual files that don't usually exist on the disk, they are mapped in as handlers in your web.config - note that IIS7 now supports the <system.webServer> element, and your handlers should be mapped in there for new sites, rather than in the <system.web> section.

I spent the week looking into this issue and no one seems to have an answer as to why I am getting the warning messages in Event Viewer.

Have asked this question on the main MS Chart forums too but no luck. link here: http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/thread/75f50254-0f02-4a73-bfbe-afab31f15f77

Will mark as answered just to close question but will update in the future if I ever find an answer. I suspect it is happening to more people but because everything on the front end looks ok no one ever really checks the logs so they might not realize it's happening to them.

In my experience you will receive this error message if the user tries to print the web page if deleteAfterServicing is not false in the web.config , because the image will have been deleted.

Also, if deleteAfterServicing=false, if user1 generates a chart, then user2 generates a chart overwriting the chart image, user2 can successfully print the chart, but user1 will trigger the exception.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!