ASP.Net Chart Control not displaying chart image
Phew! Managed to solve this myself. I wasn't setting the control up correctly, so I made these changes and it worked:
-
Removed this from the asp.net page
<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
-
Removed all web.config settings relating to asp.net chart
-
Removed the control from the page
-
Dragged the control on to the page in design view
-
Configure the chart control
-
Added a row to AppSettings in the web.config
key="ChartImageHandler" value="storage=memory;deleteAfterServicing=true;"
-
Added a row to httpHandlers in web.config
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"
Hope this helps others in the future