Skip to Content
Former Member
Jul 12, 2012 at 10:03 PM

Correct way to dispose of an ASP.NET CR page?


I recently upgraded an older CR ASP.NET site for a client from .NET 1.1 to .NET 3.5 and Visual Studio 2010, using the CRforVS_13_0_3.exe . Upgraded site seems to work fine in test where the user count is low but as soon as it's deployed to production (100-200 concurrent users) within minutes the server memory reaches GBs and the site becomes unusable. We've already had to roll back twice.

I'm not sure where the memory leak is coming from. In the Unload event I .Close/.Dispose of the CrystalReportViewer. The only hint I've been able to find in the discussion forums is to try adding a GC.Collect() after the dispose.

On an additional note, I have log4net set up and I see a lot of ParameterFieldCurrentValueExceptions getting logged. I'm trying to use the builtin JavaScript dynamic parameter prompting fields but I need to fill in one specific parameter with value based on the user's login account. The rest should be prompted to the user.

Could someone either give me a rundown on the required steps to start/build/dispose of a CR control and/or link to it using VS2010 (all the links I tend to find are outdated.)

I'd really appreciate any help, thanks,