sql-server-reporting-services rdlc performance issue

Sander 1 Reputation point
2022-10-12T11:43:39.157+00:00

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

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,799 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,238 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 55,686 Reputation points
    2022-10-12T15:26:11.483+00:00

    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.

    0 comments No comments

  2. 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);

    0 comments No comments