Error executing child request for ChartImg.axd.
I encountered the "Error executing child request" error on my page as well and followed all the instructions in this thread but no luck. So I used Reflector to see what was going on, found the Server.Execute mentioned earlier in this thread and then debugged into the .NET source code to see what was going wrong and I think I've found the cause of my error.
As mentioned everywhere you have to add the following handler to the configuration of your web app:
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD"path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" />
In my case the chart is on the second tab of a Telerik RadMultiPage which uses postbacks. When I open the second tab the chart is loaded and the Server.Execute to ChartImg.axd is called. When you use Server.Execute, the http verb used for the parent request is also used for the child request. Since I'm doing a postback the verb will be POST which -as you can see in the "verb" attribute in the configuration setting above- is not allowed so it throws an error. So the simple change you have to make to get the chart to work is to add "POST" to the allowed verbs:
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST"path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35" />
This would also explain why the chart control won't work on anything but the first page of an asp:wizard control or any other page where the EnsureInitialized check is done in a postback.
I've seen this error message on many forums without a satisfactory fix being offered, so I'm guessing it's pretty common. As far as I can tell, the Server.Execute call to ChartImg.axd is only done to ensure the handler is configured correctly. It's kind of ironic that this check is the cause of so many errors. I think it's a case of code trying to be too smart for it's own good.
The system.web section is for configuring IIS 6.0, while the system.webserver version is used to configure IIS 7.0. IIS 7.0 includes a new ASP.NET pipeline and some configuration differences, hence the extra config sections.
However...
If you're running IIS 7.0 in integrated mode only, you shouldn't need to add the handlers to both sections. Adding it to system.web as well is a fallback for IIS 7.0 operating in classic mode, unless I'm mistaken. I've not done extensive testing on this.
See http://msdn.microsoft.com/en-us/library/bb763179.aspx for