ASP.NET Charting Control no longer working with .NET 4
- by Moose Factory
I've just upgraded to .NET 4 and my ASP.NET Chart Control no longer displays.
For .NET 3.5, the HTML produced by the control used to look like this:
<img id="20_Chart" src="/ChartImg.axd?i=chart_5f6a8fd179a246a5a0f4f44fcd7d5e03_0.png&g=16eb7881335e47dcba16fdfd8339ba1a" alt="" style="height:300px;width:300px;border-width:0px;" />
and now, for .NET 4, it looks like this (note the change in the source path):
<img id="20_Chart" src="/Statistics/Summary/ChartImg.axd?i=chart_5f6a8fd179a246a5a0f4f44fcd7d5e03_0.png&g=16eb7881335e47dcba16fdfd8339ba1a" alt="" style="height:300px;width:300px;border-width:0px;" />
The chart is in an MVC partial view that is in an MVC Area folder called "Statistics" and a MVC Views folder called "Summary" (i.e. "/Areas/Statistics/Views/Summary"), so this is obviously where the change of path is coming from.
All I've done is to switch the System.Web.DataVisualization assembly from, 3.5 to 4.0.
Any help greatly appreciated.