Microsoft Chart Controls for .NET – Error executing child request for ChartImg.axd

Microsoft Chart Controls for .NET – Error executing child request for ChartImg.axd

I ran into this error today when attempting to show a web part on a SharePoint site that utilises the .NET 3.5 Chart Controls from MS (See link at the bottom of the post).

When the page opened it bombed out with the above error, some research found the following question on stackoverflow -

To fix this error you need to add the following entry into the <HttpHandlers> section of the web.config file:

[code lang="plain"]<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />[/code]

When I refreshed the page, I received another error – this time it was:

Invalid temp directory in chart handler configuration

If you too get this error then you need to make sure you have the following line in the <appSettings> section of the web.config:

[code lang="plain"]<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:TempImageFiles;" />[/code]

Also make sure that the above directory ‘TempImageFiles’ exists on the C: drive or you can change this to any other directory that you like.

Hope this helps! :-)

Download link for MS Chart Controls:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">