ASP.NET Charting Control 3.5 fix for "Error executing child request for ChartImg.axd"

When first installing the Microsoft Chart Controls for Microsoft .NET Framework 3.5, you may receive this error:

Error executing child request for ChartImg.axd.

Exception Details: System.Web.HttpException: Error executing child request for ChartImg.axd.



By default, the chart controls are designed to run by using an HttpHandler which will generate the chart images on the fly. Because of this, if you just create a new project and drag and drop the chart control onto your page, you will get this error if you do not register the HttpHandler section in your web.config for this control library.

To fix this issue, go to your web.config and in your httpHandlers section (add one if it is not there), put this XML code:

<httpHandlers>
  <add path="ChartImg.axd" 
       verb="GET,HEAD" 
       type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, 
         System.Web.DataVisualization, 
         Version=3.5.0.0, 
         Culture=neutral, 
         PublicKeyToken=31bf3856ad364e35" 
       validate="false"/>
</httpHandlers>

 

Now rebuild your web project and run it and you should be good to go. You can download the chart control library here for free:

http://www.microsoft.com/downloads/details.aspx?FamilyID=130f7986-bf49-4fe5-9ca8-910ae6ea442c&DisplayLang=en

Thks

Thanks man!

From Brazil!

Fixing "Error executing child request for ChartImg.axd"

Dear All,
in such situation,
Simply you can add "POST" in the verb section in your web config, which it will look like this:

add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
validate="false"

Best Regards,
Mohammad Shahbazi

Thanks Mohammad , its working

Thanks Mohammad , its working
--Nishantha

This is not always the case.

This is not always the case. I have the handler but I still get the error. Crazy thing is that it doesn't happen all the time. It seems that lots of people are having this issue and it seems to have something to do with dynamic rendering of the control or rendering the control in a dynamically created control.

I have the chart in a webusercontrol that is loaded using the LoadControl method. Sometimes I have the problem and other times I don't.

I read of people having the problem when using the chart in a wizard, which I'm guessing does some of the same dynamic type stuff.

We fixed the problem by

We fixed the problem by deleting all charts files from the temp folder.

Regards,

Solution to ChartImg.axd error

Yeah.. adding POST in the verb part of web.config file worked for me.
Thanks for the solution.

Jyotsna.

if using ajax - use triggers

I had same problem - and tried all the suggestions e.g. POST etc. But no luck - the reason was due to AJAX.

What worked for me was to include extra triggers in the update panels. Since the charts were in update panels - even though they were changing I still got error after 20 minutes of use. here is snippet:

Hi, you have to make sure the

Hi, you have to make sure the version and public key token is same in both "system.web/compilation/assemblies" and "system.web/httpHandlers". For example, see the following "system.web" section:







verb="GET,HEAD"
type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
validate="false"/>

error occurring after adding charts to user control

Hi all,

in my project i added chart control from my toolbox and done changes in web.config file even i am getting the same errors that " Sys.WebForms.PageRequestManagerServerErrorException: Error executing child request for ChartImg.axd." please anyone let me know what would be the problem and help me to fix this issue, this is very important.

changes done in web.config:

-Thanks in advance.

-Sindhu.A