I found a solution in this forum. I changed the web config as:
From
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
To
<add key="ChartImageHandler" value="storage=file;timeout=20;" />
转载于:https://www.cnblogs.com/Kazaf/archive/2011/11/21/2256795.html