If I run my web application locally everything runs fine.
On the IIS server always a JavaScript error comes up.
JavaScript because I use ASP.NET AJAX with the AjaxControlToolkit & the ToolkitScriptManager.

It throws a http error code 500 (internal server error).
It has to do with the chart control because when I comment the line that adds the control to a panel it runs fine again.
I had to add an httpHandler to the web.config to make the chart control come to life:
<httpHandlers>
<add verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</httpHandlers>
My first guess was that the path property is not set correctly for an IIS server. Maybe the write permissions were not given or something like that but I tried different paths without any success.
Any ideas?
I decided to upload a non ajaxy web application with nothing but a chart control in it. My hope was to get a “real” exception and I got one.
It was a DirectoryNotExistException and it also provided me the path: “c:\TempImageFiles”.
After creating this directory the image file could be generated and showed up again.