views:

877

answers:

5

Hi,

I have been using the ASP.NET chart controls for a while on win2k3 (32bit) setups without any issue but have noticed that on our new win2k8 (64bit) box I am getting a warning message showing up in the event viewer from the chart control.

In my web.config file I have the following tag telling the Chart Control where I can store the Temp Files:

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

Below is the warning message produced by the control:


Event code: 3005 Event message: An unhandled exception has occurred. Event time: 10/7/2009 2:40:03 PM Event time (UTC): 10/7/2009 2:40:03 PM Event ID: 237c3b208962429e8bbc5a48ffd177f0 Event sequence: 2860 Event occurrence: 26 Event detail code: 0

Application information: Application domain: /LM/W3SVC/2/ROOT-1-128993655360497729 Trust level: Full Application Virtual Path: / Application Path: C:\data\sites\mydomain.com\ Machine name: 231692-WEB

Process information: Process ID: 4068 Process name: w3wp.exe Account name: NT AUTHORITY\NETWORK SERVICE

Exception information: Exception type: ArgumentException Exception message: The image is not found.

Request information: Request URL: http://www.mydomain.com/ChartImg.axd?i=chart%5F0%5F3.png&amp;g=bccc8aa11abb470980c60e8cf1e71e15 Request path: /ChartImg.axd User host address: my domain ip User:
Is authenticated: False Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information: Thread ID: 7 Thread account name: NT AUTHORITY\NETWORK SERVICE Is impersonating: False Stack trace: at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.ProcessSavedChartImage(HttpContext context) at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


It's worth pointing out that ALL of the chart images are displayed correctly on the screen so I'm not sure when/where the image not found error is being caused. Is this a 64bit issue?

Thanks, Rich

A: 

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.

Zhaph - Ben Duguid
Thanks for your suggestion Zhaph. The sites application pool says that it's running in Integrated mode. My Web.config also includes the chart control in the <system.webServer><handlers> section too so this is a bit odd. It's not a show stopper but it would be nice to tweak this so the warning messages disappear if it was possible. Any other tips I could try? Thanks again for your help.
Richard Reddy
Sadly, those were the only tips I could think of - I've not really done much with IIS7 at all.
Zhaph - Ben Duguid
Not to worry. Thanks for the help anyways ;)
Richard Reddy
A: 

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.

Richard Reddy
+1  A: 

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;" />
Collin K
A: 

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.

Neil
A: 
Developer_India