views:

62

answers:

1

The .net charting controls are advertised as being built into .net 4.0. However, they do not work in Visual Studio 2010 Pro or Visual Web Developer 2010 Express. I get the error, System.Web.HttpException: Error executing child request for ChartImg.axd.

That sounds like the message from .net 3.5 if charting wasn't set up correctly. But the bottom of the same page says, "Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1"

Does anyone know why this doesn't work?

A: 

The charting dll's are included in 4.0. However, you still have to configure charting in your app web.config if you want to use it. I spent an inordinate amount of time studying this, based on statements made in this blog post,

http://weblogs.asp.net/scottgu/archive/2010/02/07/built-in-charting-controls-vs-2010-and-net-4-series.aspx

"You can use this control without having to register or wire-up any configuration file entries."

I emailed Scott and received the following answer. Hope this may help someone:

From: Scott Guthrie [mailto:[email protected]]
Sent: Tue 6/15/2010 10:19 PM
To: Karen xxxxx
Subject: RE: Built-in .Net 4.0 Charting Controls Require Web.Config Updates

Hi Karen,

Sorry about that - there was a late change that we made that ended up requiring that the charting controls have some configuration added to web.config to work. This was done to avoid us loading the assembly unnecessarily (which increases memory) for cases where it is not being used.

Sorry for the confusion,

Scott

kc