Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET ReportViewer very slow in local mode

I'm using .Net 4.5 and ReportViewer 11 in local mode. My reports are rendered very slowly (10 min). I found in this post that adding <trust legacyCasModel="true" level="Full"/> to web.config will solve the problem, and it did. Report render time went from 10 minutes to 10 seconds, but now my dynamic variables in other parts of the system don't work. This is the error:

Dynamic operations can only be performed in homogenous AppDomain.

Is there a way to set <trust legacyCasModel="true" level="Full"/> or something with the same effect in only one page?

like image 212
nima Avatar asked Sep 11 '13 09:09

nima


3 Answers

Please use following link for more information

https://codeontime.com/blog/2014/08/improving-performance-of-reports-in

Add:

<trust legacyCasModel="true" level="Full"/> 

in Section: configuration/system.web of Webconfig. It helps to Improve report Performance by 10 Times. But effects dynamic objects in MVC projects.

like image 119
Ricky007 Avatar answered Nov 12 '22 18:11

Ricky007


Changing the .net framework to 3.5 will help you load your reports in half a time. You can give a try in your case.

like image 1
V.J. Avatar answered Nov 12 '22 19:11

V.J.


The latest in this issue can be found here https://connect.microsoft.com/VisualStudio/feedback/details/561679/reporting-services-using-parameter-for-dynamic-grouping-very-slow and it looks like it may be addressed in sql server 2012.

If you are not using 4.5 specific features rollback to 3.5 is the most feasible option. Since the cas setting is part of the web.config the option is not available on a per page basis

Consider building a one page sub site for your report page where the sub site is a separate application with a 3.5 app pool, might be worth a quick test

like image 1
Mike Beeler Avatar answered Nov 12 '22 19:11

Mike Beeler