事件查看器中的 ASP.NET 图表控件错误
我已经在 win2k3(32 位)设置上使用 ASP.NET 图表控件一段时间了,没有任何问题,但注意到在我们新的 win2k8(64 位)框中,我从图表控件的事件查看器中收到一条警告消息。
在我的 web.config 文件中,我有以下标记告诉图表控件可以存储临时文件的位置:
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
下面是控件生成的警告消息:
事件代码:3005 事件消息:发生了未处理的异常。 活动时间:2009年10月7日 2:40:03 PM 活动时间(UTC):2009年10月7日 2:40:03 PM 事件 ID:237c3b208962429e8bbc5a48ffd177f0 事件序列:2860 事件发生:26 活动详细代码:0
申请信息: 应用域:/LM/W3SVC/2/ROOT-1-128993655360497729 信任级别:完全 应用程序虚拟路径:/ 应用程序路径:C:\data\sites\mydomain.com\ 机器名称:231692-WEB
进程信息: 进程ID:4068 进程名称: w3wp.exe 帐户名:NT AUTHORITY\NETWORK SERVICE
异常信息: 异常类型:ArgumentException 异常消息:找不到图像。
请求信息: 请求网址: http://www.mydomain.com/ChartImg .axd?i=chart_0_3.png&g=bccc8aa11abb470980c60e8cf1e71e15 请求路径:/ChartImg.axd 用户主机地址:我的域ip 用户:
是否已验证:假 身份验证类型:
线程帐户名称:NT AUTHORITY\NETWORK SERVICE
线程信息: 线程 ID:7 线程帐户名称:NT AUTHORITY\NETWORK SERVICE 是否冒充:假 堆栈跟踪:位于 System.Web.UI.DataVisualization.Charting.ChartHttpHandler.ProcessSavedChartImage(HttpContext context) 在 System.Web.UI.DataVisualization.Charting.ChartHttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext 上下文) 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&completedSynchronously)
值得指出的是,所有图表图像都正确显示在屏幕上,因此我不确定何时/何处导致图像未找到错误。这是64位的问题吗?
谢谢, 富有的
I have been using the ASP.NET chart controls for a while on win2k3 (32bit) setups without any issue but have noticed that on our new win2k8 (64bit) box I am getting a warning message showing up in the event viewer from the chart control.
In my web.config file I have the following tag telling the Chart Control where I can store the Temp Files:
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
Below is the warning message produced by the control:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 10/7/2009 2:40:03 PM
Event time (UTC): 10/7/2009 2:40:03 PM
Event ID: 237c3b208962429e8bbc5a48ffd177f0
Event sequence: 2860
Event occurrence: 26
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/2/ROOT-1-128993655360497729
Trust level: Full
Application Virtual Path: /
Application Path: C:\data\sites\mydomain.com\
Machine name: 231692-WEB
Process information:
Process ID: 4068
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: ArgumentException
Exception message: The image is not found.
Request information:
Request URL: http://www.mydomain.com/ChartImg.axd?i=chart_0_3.png&g=bccc8aa11abb470980c60e8cf1e71e15
Request path: /ChartImg.axd
User host address: my domain ip
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 7
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.ProcessSavedChartImage(HttpContext context)
at System.Web.UI.DataVisualization.Charting.ChartHttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
It's worth pointing out that ALL of the chart images are displayed correctly on the screen so I'm not sure when/where the image not found error is being caused. Is this a 64bit issue?
Thanks,
Rich
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
每当用户尝试将图表从 IE 复制或拖动到 Word 文档时,我都会遇到同样的错误。默认情况下,服务器会在图表图像传送到用户浏览器后立即删除它们,而 IE 似乎不会复制缓存的图像数据。我不确定其背后的机制,但在复制或粘贴时,必须再次从服务器获取图像。通过将 web.config 中的条目更改为:
I had the same error occur whenever users tried to copy or drag a chart from IE to a Word document. By default the server deletes chart images immediately after they've been delivered to the user's browser, and IE doesn't seem to copy the cached image data. I'm not sure of the mechanics behind it, but on either the copy or the paste, the image has to be fetched from the server again. The problem was resolved by changing the entry in web.config to:
您是在本机 IIS7 站点中运行它,还是在 ASP.NET 2.0 兼容模式下运行的 IIS7 站点中运行它?
IIS 可能只是在日志记录方面有点冗长,或者记录存在问题,然后回退到旧支持类型模式 - .axd 文件是磁盘上通常不存在的虚拟文件,它们映射为 web.config 中的处理程序 - 请注意,IIS7 现在支持
元素,并且您的处理程序应映射到新站点的此处,而不是映射到
部分。Are you running this in a native IIS7 site, or an IIS7 site running in ASP.NET 2.0 compatibility mode?
It's possible that IIS is just being a bit verbose with it's logging, or logging that there's an issue, and then falling back to a legacy support type mode - the .axd files are virtual files that don't usually exist on the disk, they are mapped in as handlers in your web.config - note that IIS7 now supports the
<system.webServer>
element, and your handlers should be mapped in there for new sites, rather than in the<system.web>
section.我花了一周时间研究这个问题,似乎没有人能回答我为什么在事件查看器中收到警告消息。
也在主要的 MS Chart 论坛上问过这个问题,但没有运气。链接在这里: http:// /social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/thread/75f50254-0f02-4a73-bfbe-afab31f15f77
将标记为已回答只是为了结束问题,但如果我发现,将来会更新一个答案。我怀疑这种情况发生在更多的人身上,但因为前端的一切看起来都很好,没有人真正检查过日志,所以他们可能没有意识到这种情况发生在他们身上。
I spent the week looking into this issue and no one seems to have an answer as to why I am getting the warning messages in Event Viewer.
Have asked this question on the main MS Chart forums too but no luck. link here: http://social.msdn.microsoft.com/Forums/en-US/MSWinWebChart/thread/75f50254-0f02-4a73-bfbe-afab31f15f77
Will mark as answered just to close question but will update in the future if I ever find an answer. I suspect it is happening to more people but because everything on the front end looks ok no one ever really checks the logs so they might not realize it's happening to them.
根据我的经验,如果 web.config 中的 deleteAfterServicing 不为 false,则如果用户尝试打印网页,您将收到此错误消息,因为图像将被删除。
另外,如果deleteAfterServicing=false,如果user1生成图表,则user2生成图表覆盖图表图像,user2可以成功打印图表,但user1会触发异常。
In my experience you will receive this error message if the user tries to print the web page if deleteAfterServicing is not false in the web.config , because the image will have been deleted.
Also, if deleteAfterServicing=false, if user1 generates a chart, then user2 generates a chart overwriting the chart image, user2 can successfully print the chart, but user1 will trigger the exception.