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

后端 未结 12 1925
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 00:19

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

相关标签:
12条回答
  • 2020-12-08 00:59

    try (dont forget path in ChartImageHandler key)

        <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>
    
    0 讨论(0)
  • 2020-12-08 01:00

    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=3.5.0.0, 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.

    0 讨论(0)
  • 2020-12-08 01:00

    Another cause for this problem can be because the application pool is set to 'Classic' mode. My handler was configured correctly, but I was getting the same error.

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

    As soon as I switched the application pool to 'Integrated' mode. The chart control started working correctly.

    0 讨论(0)
  • 2020-12-08 01:02

    This problem was resolved by adding chatImageHandler in the webconfig.

    <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <handlers>
          <remove name="ChartImageHandler"/>
          <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        </handlers>
      </system.webServer>
    

    for more details: http://www.infinetsoft.com/Post/-Solved-Error-executing-child-request-for-ChartImg-axd/1164#.VyenrNJ97cs

    0 讨论(0)
  • 2020-12-08 01:03

    I ran into this error, but to correct it by adding an element to the system.web\httpHandler section of my web.config file. I added the follow:

    <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" />
    
    0 讨论(0)
  • 2020-12-08 01:05

    Also note that while dragging the chart control from the toolbox onto your page is supposed to create the necessary entries in web.config, this only occurs if you are in design mode at the time.

    If you are in source mode and drag and drop it will not happen.

    Also, there must be some form of registration that occurs in the project/class file when you add a chart control in design mode. Because if you are in source mode and dnd a chart control you wont get the entries in web.config as above. If you then step into design mode and dnd from the toolbox into the page, you will get the entries in web.config.

    But if then delete the chart, you dnd'd in design mode, it will wipe the entries from web.config (assuming a single page site) even though you still have the other chart control on the page from when you dnd'd into source mode.

    So no, you're not crazy it's just not intuitive. ;)

    0 讨论(0)
提交回复
热议问题