I have a strange situation using asp ajax chart controls. I have an application which is attempting to display a chart on an aspx page. Here are a couple of snippets from my web.config -
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\temp\;"/>
</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>
<remove name="ChartImageHandler"/>
<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>
When I run the application through the VS2010 IDE, I am getting the following error when trying to display the chart -
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Unknown server tag 'asp:Chart'.
However, if I deploy it to my server, it seems that the chart cannot be found (an outline where the image would be appears with the red X saying that the image cannot be found). The difference is that I am running the IDE from windows xp 32bit machine, and the server I deploy to is a 64bit Server 2008 machine running IIS 7.
Does anyone have any idea why I might be having these problems? Thanks for any thoughts.
In the web.config <controls>
section add the following:
<add tagPrefix="asp"
namespace="System.Web.UI.DataVisualization.Charting"
assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Or you can register the controls on the page you are using them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With