I have added asp chart controls in my website project and it has been working fine. But when I deploy it in production server and try to run in IIS 7, it throws an error "No http handler was found for request type 'POST'" and
[HttpException (0x80004005): No http handler was found for request type 'POST'] ................... [HttpException (0x80004005): Error executing child request for ChartImg.axd.] .....................
The website worked fine when there was no chart control. This is how my web.config file is:
<configuration><appSettings><add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;"/></appSettings><connectionStrings></connectionStrings><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><compilation debug="true" targetFramework="4.0"><assemblies><add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies></compilation><pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"><controls><add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/></controls></pages><customErrors mode="Off"/></system.web><system.webServer><modules runAllManagedModulesForAllRequests="true"/><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></configuration>
I have seen there are some other posts in this issue, based on the solutions I tried `
<add key="ChartImageHandler" value="storage=file;timeout=20;"/>
` and `
<add key="ChartImageHandler" value="storage=memory;deleteAfterServicing=true;"/>
`, but couldn't solve the issue yet. FYI, the server supports .net 4.0. Please Help.