tags:

views:

18

answers:

1

Hello, 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.

A: 

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.

rtalbot
I had tried that in there, but was still getting the error. I figured out that I had the version wrong in a few places - I had version 3.5.0.0. Changing the version to 4.0.0.0 cleared up the errors. Thanks for the help!
czuroski
I spoke too soon. In the IDE, I am still getting an error, however it is slightly different. now, it says - BC30560: 'Chart' is ambiguous in the namespace 'System.Web.UI.DataVisualization.Charting'.
czuroski