MSCharts "No http handler was found for request type 'GET'" error

Danil picture Danil · Jan 22, 2010 · Viewed 40.8k times · Source

I tried to install MSCharts on my Win2008 server. It installed without problem. Then I wrote in config.

But when I'm trying to open page with charts it returned following error. No http handler was found for request type 'GET'

Do you have any thougths about the problem?

Answer

Sai Nayagar picture Sai Nayagar · Oct 21, 2010

This is what you need for ASP.NET 4.0 / IIS 7.5 on Windows 7:

Your web.config must contain the following:

<appSettings>
  <add key="ChartImageHandler" value="storage=file;timeout=20;" />
</appSettings>


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

<system.webServer>

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

You also need this at the top of your aspx page:

<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>

Hope this helps