解决Asp.net中的Chart控件运行出现错误提示“ ChartImg.axd 执行子请求时出错”
生活随笔
收集整理的這篇文章主要介紹了
解决Asp.net中的Chart控件运行出现错误提示“ ChartImg.axd 执行子请求时出错”
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
首先經過錯誤提示看出需要保存路徑之類的,所以猜測是不是配置文件出錯了。看了一下配置文件只有連接字符串的配置。后來重新把vs2010關了重新打開,又新建了一個頁面,重新添加空間然后運行使用。然后再看配置文件,發現多了許多東西。具體沒有配置的東西如下:
<?xml version="1.0"?> <!--有關如何配置 ASP.NET 應用程序的詳細消息,請訪問http://go.microsoft.com/fwlink/?LinkId=169433--> <configuration><appSettings><add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" /></appSettings><system.webServer><handlers><remove name="ChartImageHandler" /><add name="ChartImageHandler" preCondition="integratedMode" 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" /></handlers></system.webServer><connectionStrings><add name="testConnectionString" connectionString="Data Source=.;Initial Catalog=test;User ID=sa;Password=******" providerName="System.Data.SqlClient"/></connectionStrings><system.web><httpHandlers><add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"validate="false" /></httpHandlers><pages><controls><add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /></controls></pages><compilation debug="true" targetFramework="4.0"><assemblies><add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies></compilation></system.web> </configuration>最后這樣就可以運行了。
轉載于:https://www.cnblogs.com/Hackerman/p/4033954.html
總結
以上是生活随笔為你收集整理的解决Asp.net中的Chart控件运行出现错误提示“ ChartImg.axd 执行子请求时出错”的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Webserver管理系列:11、注意默
- 下一篇: ping: sendto: Networ