解决 ASP.NET Chart 控件出错 为 ChartImg.axd 执行子请求时出错
2009-11-17 16:52:50 来源:WEB开发网核心提示:解决方法一:1. 修改web.Configview plaincopy to clipboardPRint?<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/TempImages/;" /&g
解决方法一:
1. 修改web.Config
view plaincopy to clipboardPRint?
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/TempImages/;" />
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/TempImages/;" />
将其中的 dir=c:\TempImages\ 的绝对路径 修改外 url=~/TempImages/ 相对路径 (前提条件:网站文件中必须包含 TempImages文件夹)
2. 修改
view plaincopy to clipboardprint?
<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,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
为
view plaincopy to clipboardprint?
<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" />
<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. 修改
view plaincopy to clipboardprint?
<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"
path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
为:
view plaincopy to clipboardprint?
<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" />
<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" />
解决方法二:
打开*.aspx页面,删除原来MSCchart产生的网页代码(如果你的MSChart控件已经都设置好了很多项觉得删除可惜,就剪切吧)
然后切换到设计界面,在工具箱中选择MSChart控件,重新拖入进去,就可以自动在web.config中添加上面的代码
1. 修改web.Config
view plaincopy to clipboardPRint?
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/TempImages/;" />
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/TempImages/;" />
将其中的 dir=c:\TempImages\ 的绝对路径 修改外 url=~/TempImages/ 相对路径 (前提条件:网站文件中必须包含 TempImages文件夹)
2. 修改
view plaincopy to clipboardprint?
<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,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
为
view plaincopy to clipboardprint?
<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" />
<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. 修改
view plaincopy to clipboardprint?
<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"
path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
为:
view plaincopy to clipboardprint?
<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" />
<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" />
解决方法二:
打开*.aspx页面,删除原来MSCchart产生的网页代码(如果你的MSChart控件已经都设置好了很多项觉得删除可惜,就剪切吧)
然后切换到设计界面,在工具箱中选择MSChart控件,重新拖入进去,就可以自动在web.config中添加上面的代码
- ››asp.net页面弄成伪静态页面
- ››解决flash 中无法导出swf文件的方法
- ››解决"ios模拟器未能安装此应用程序"办法...
- ››解决jquery easyui easyloader加载外部js文件失败...
- ››解决无法使用Android SDK Manager下载SDK开发包的...
- ››解决网页内容无法复制
- ››解决Android手机在开发调试时logcat不显示输出信息...
- ››解决Windows 8操作系统假死的方法
- ››解决ubuntu 不识别 android 设备 方法
- ››解决ubuntu server sudo出现sudo:must be setuid ...
- ››解决数据库 Table 'content_tags' is mar...
- ››解决FF浏览器和IE下载文件乱码问题
更多精彩
赞助商链接