reportviewer 严重消耗内存
最近,發現當ReportViewer繫結的資料太大時,會發生 Memory leak。也就是吃記憶體,而且不會吐回來。
SQL reporting services ReportViewer control increases w3wp process memory
#################
There are actually two problems here. Running a report requires the report processing engine to generate and load an assembly in order to evaluate expressions in the report. By default in local mode, this expression host assembly is loaded into the main appdomain. Since assemblies can't be individually unloaded, it remains loaded permanently.
Local mode does have the option to run expressions in a sandboxed appdomain (ReportViewer.LocalReport.ExecuteReportInSandboxAppDomain()). However, there is currently a bug that this appdomain does not get unloaded at the appropriate time. We are currently working on a fix for this and hope to get this into VS 2008 SP1. If you need a fix sooner, customer support may be able to provide additional options: http://support.microsoft.com/contactussupport
#################
I'm using ReportViewer control in asp.net project and detect memory leak. I have installed visual studio 2008 sp1 and ReportViewer sp1, however the new ReportViewer (Version 9.0.0) doesn't solve the problem.
Could anybody provide some suggestion for web ReportViewer?
Thank you very much.
#################
I observed the same problem using, in a batch process, iteratively the method ReportViewer.Render.
This causes a very problematic leak, my intention was to use ReportViewer to produce a lot of PDF documents (invoices) (> 5000 or more) and this leak forces me to stop-restart this batch process.
In other answers you say that the fix for this problem will come in a Microsoft ReportViewer for VS 2008 SP.
Is it possible to have a fix for this for .NET 2.0 (that is, with Microsoft ReportViewer for VS 2005)?
In my production systems for now I have .NET 2.0 Runtime installed and for now I have no time and plan to pass to .NET 3.5 to run the fix.
For now I haven't a plan to use Microsoft ReportViewer for VS 2008 (from Microsoft site, the Redistribuitable package requires to install the .NET 3.5 runtime) and .NET 3.5 runtime.
Then, is it possible to have a fix for this problem that runs on .NET 2.0 Runtime?
If Session.Count > 0 Then
For i As Integer = 0 To Session.Count - 1
If Session(i).GetType().ToString() =
"Microsoft.Reporting.WebForms.ReportHierarchy" Then
Session.RemoveAt(i)
End If
Next
End If
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=449474&SiteID=1
http://www.scitech.se/blog/index.php/2007/10/05/memory-leak-in-toolstriptextboxcontrol/#comment-1295
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=305199
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
2008-01-22 IDENTITY列的检查指定表的当前标识值