ASP.NET ReportViewer very slow in local mode

asp.netlocalreportperformancereportviewer

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?

Best Answer

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.