Reply to comment

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

Reply