解决ASP.NET Chart 控件出错,为 ChartImg.axd 执行子请求时出错
1. 修改web.Config
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/TempImages/;" />
将其中的 dir=c:\TempImages\ 的绝对路径 修改外 url=~/TempImages/ 相对路径 (前提条件:网站文件中必须包含 TempImages文件夹)
2. 修改
<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" />
为
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
3. 修改
<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" />
为:
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST"
path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/hhxshhxs88/archive/2009/08/07/4421953.aspx