本文主要是介绍[ExternalException (0x80004005): GDI+ 中发生一般性错误。] System.Drawing.Image.Save(String filename, Image,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题描述
某个报表的菜单打开,出现如下错误信息
在IIS上直接访问该页面,出现如下错误:
[ExternalException (0x80004005): GDI+ 中发生一般性错误。] System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) +764797 Infragistics.WebUI.UltraWebChart.UltraChart.Render(HtmlTextWriter output) +14771 [ImageStoreException: Unable to write chart image files at given file path. Please check and correct UltraChart's DeploymentScenario property. Or please provide write permissions to directory path where chart must save images. Please refer Deployment Scenario section in help files. -Or- Follow KB article link: http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=5444 ] Infragistics.WebUI.UltraWebChart.UltraChart.Render(HtmlTextWriter output) +23382 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246 System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) +331 System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) +114 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150 ASP.masterpage_master.__Renderform1(HtmlTextWriter __w, Control parameterContainer) +435 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter
排查过程
1.由于未使用过Infragistics.WebUI.UltraWebChart,
根据System.Drawing.Image.Save(String filename 判断可能是代码里生成图片路径有问题。 没有源码的情况下,麻烦程度直线上升。反编译出来,查看源码,未找到Save相关的事件。页面的Load事件也没有异常。调用的存储过程也正常执行。
2.查看相同路径下的另一个报表模块。打开正常,对比两个页面的代码也没有大的差异。
3.最后对比IIS网站物理路径下,两个网页的文件。 发现ChartImages文件夹下的图片数不一致。就把缺的几张图片拷贝过去。浏览器再次访问有问题的模块链接,发现可以了!!! 码,
总结
1.呆呆的看源码,浪费了好多时间 T_T
2.以后有需要用Infragistics.WebUI.UltraWebChart 再研究研究。因为看拷贝过去的图片 内容上是一样的。暂时还不知道原理是怎么样的~ .~
这篇关于[ExternalException (0x80004005): GDI+ 中发生一般性错误。] System.Drawing.Image.Save(String filename, Image的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!