SPa*_*dya 5 asp.net iis highcharts
我正在使用高图,只有当我在Intranet网络中的IIS服务器上运行我的网站时才会收到此错误.相反,它在开发服务器中工作正常(visual studio 2012)
图表处理程序配置[c:\ TempImageFiles]中的临时图像目录无效.请编辑web.config文件.CharImageHandler键,Dir值必须指向有效目录.当存储模式等于文件系统时,该目录是临时映像存储所必需的.
堆栈跟踪
[DirectoryNotFoundException: Invalid temp images directory in chart handler configuration [c:\TempImageFiles\]. Please edit the web.config file. The CharImageHandler key, Dir value must point to a valid directory. The directory is required for temporary image storage when storage mode equals file system.]
System.Web.UI.DataVisualization.Charting.ChartHttpHandlerSettings.Inspect() +1426397
System.Web.UI.DataVisualization.Charting.ChartHttpHandlerSettings.ParseParams(String parameters) +1352
System.Web.UI.DataVisualization.Charting.ChartHttpHandler.get_Settings() +197
System.Web.UI.DataVisualization.Charting.ChartHttpHandler.InitializeControllerFile() +51
System.Web.UI.DataVisualization.Charting.ChartHttpHandler.EnsureInitialized(Boolean hardCheck) +357
System.Web.UI.DataVisualization.Charting.Chart.get_CurrentImageLocation() +50
System.Web.UI.DataVisualization.Charting.Chart.Render(HtmlTextWriter writer) +345
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +249
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +249
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +395
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +49
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +249
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +249
System.Web.UI.Page.Render(HtmlTextWriter writer) +40
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5363
Run Code Online (Sandbox Code Playgroud)
SPa*_*dya 19
以前它就是这样的 web.config
<add key="ChartImageHandler" value="storage=file;timeout=20; dir=c:\TempImageFiles/;" />
Run Code Online (Sandbox Code Playgroud)
我删除了目录位置
<add key="ChartImageHandler" value="storage=file;timeout=20;" />
Run Code Online (Sandbox Code Playgroud)
问题解决了.
检查您的服务器上是否存在该文件夹,并向您的站点正在为该文件夹运行的应用程序池的用户授予读/写权限。
或者,您可以简单地将临时文件夹移动到站点根目录 Es 中:“~/temp”并配置 highchart 以使用该文件夹。
或者你可以改变你的 ChartImageHandler 从
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
Run Code Online (Sandbox Code Playgroud)
到
<add key="ChartImageHandler" value="storage=file;timeout=20;" />
Run Code Online (Sandbox Code Playgroud)
所以他会使用默认的windows temp目录
| 归档时间: |
|
| 查看次数: |
21244 次 |
| 最近记录: |