.NET 3.5 chart controls exception: Error executing child request for ChartImg.axd


Anyone getting this error when using the new free chart controls MS bought from Dundas?

"Error executing child request for ChartImg.axd"

On the MSDN forum they suggested it was my web.config:
MSDN forum post

So far that hasn't fixed the problem though. Any other ideas?

Best Solution

I encountered the same problem: the chart would work on one page but not on the next. Turns out if the chart is initialized for the first time in a POST (i.e. a postback) the error is thrown because the handler is configured incorrectly. To fix the issue modify the httpHandler configuration that user LaptopHeaven referred to in this topic by adding the POST verb:

<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" />

I've written a more thorough explanation of why this error occurs in the MSDN forum post that Scott Anderson referred to in his opening post of this topic.