Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error executing child request for ChartImg.axd. This is not a duplicate

I have tried all solutions on this thread: .NET 3.5 chart controls exception: Error executing child request for ChartImg.axd

I added the

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

code to the httpHandlers section but it still doesn't work.

I have also added:

<appSettings>
    <add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
</appSettings>

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

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

...
</handlers>

But after fighting for a while to place those tags in the correct places in the config file i get the same error.

Here is my config file currently:

<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>

  <appSettings>
    <add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
  </appSettings>
  <system.web>
    <httpHandlers>

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

    </httpHandlers>

    <!--<pages>
      <controls>
        <add tagPrefix="artem" namespace="Artem.Google.UI" assembly="Artem.Google"/>
      </controls>
    </pages>-->
    <compilation debug="true" targetFramework="4.5">

      <assemblies> 
        <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  

      </assemblies>

    </compilation>

    <httpRuntime targetFramework="4.5"/>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
  </system.webServer>
</configuration>

Ive been stuck on this for two hours not able to get anything working. I am using .net framework 4.5

like image 747
user1809104 Avatar asked Apr 14 '13 10:04

user1809104


1 Answers

Here was my situation:

  • upgraded from 3.5 to 4.0
  • it worked when compiled locally on my machine (64-bit Win7)
  • Did NOT work when published to a Win2003 server

I was simply missing this:

<system.web><httpHandlers>
  <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    validate="false" />
</httpHandlers></system.web>
like image 66
Michael Avatar answered Sep 21 '22 13:09

Michael