Error!
Success!

Getting System.OutOfMemoryException using ReportViewer contol

0
kicks

Getting System.OutOfMemoryException using ReportViewer contol  (Unpublished)

PROBLEM: ======== Consider you've a ASP.NET application that contains Report Viewer control in Local Mode. You have an RDLC report file, that loads huge amount of data. Eerytime you refresh the web page, the Report Viewer stores objects in the session. The behaviour of Report Viewer storing objects in the session is by design. Each time the report viewer page is refreshed the complete report info object is added to session. These objects obviously gets deeply rooted in session and so Garbage collector never collects them untill the complete app unloads itself. And that is apparently going to increase the memory pressure in multiple folds, ending up with System.OutOfMemoryException.


Kicked By:
Drop Kicked By: