The issue is the running of vb code in the report. Modern security requires a sandbox which kills performance. As rdlc is based on an “old” technology, it not likely to get any improvements. You should probably look for a replacement technology.
sql-server-reporting-services rdlc performance issue
We use Microsoft.ReportViewer.WebForms, Version=15.0.0.0 in asp.net
c# .net framework 4.8
So far all rdlc reports render fine but we are testing with large report now and it takes like 20 mins to render.
Data in sql management studio is miliseconds and debugging Datasource is 1 sec tops. the 20 mins is really used to render the report.
So after lots of experimenting like changing grooping, calculations in report etc the conclusion is that is not the solution.
So then I found a change of web.config on the web <trust legacyCasModel="true" level="Full"/> and strange thing is that it completely solves
it as everything is perfectly fast after the change and within 10 secs I have full report rendered on screen.
So 20 min > 10 secs with this web.config change.
PROBLEM is that I am not willing to change a security setting to legacy mode on any production server. period.
Also tried things like setting up library in .net 3.5 just for the rendering code and it works but doesn't support RDLC 15.0.0.0 (VS 2019 - 2022)
I read a lot about this subject but the discussions allready going years back. I cannot believe MS didn't solve this yet?
So anyone?
Thanx
2 answers
Sort by: Most helpful
-
-
Chanchal Rawat 1 Reputation point
2022-10-14T11:47:10.153+00:00 Dear @Sander
Please try this option
System.Security.PermissionSet secSetting =new System.Security.PermissionSet(System.Security.Permissions.PermissionState.Unrestricted);
ReportViewer1.LocalReport.SetBasePermissionsForSandboxAppDomain(secSetting);