共用方式為


ASP.NET MVC - Handling SSRS reports with ReportViewer – Part II – Deployment Challenges

In part I – we’ve discussed how to create the report + how to get it working on a local box. The real fun starts when it comes to deployment.

Here is the summary of challenges I faced:

1. When I deployed the solution to a Windows Server 2003 box I got the error below

 
An error occurred during local report processing. The definition of the report 'Main Report' is invalid. An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC2001] file 'C:\WINDOWS\TEMP\32gyhjpr.0.vb' could not be found’. 

I had no clue from where the file name is coming. I found a reply here on this issue:

https://www.developmentnow.com/g/115_2006_6_0_0_772341/Required-Security-for-Report-Viewer-on-Windows-2003-SP1-Web-Server.htm

So – assigned proper permissions to Temp directory as specified in the URL above.

2. The other issue was – if I have both versions of ReportViewer assemblies installed (8.0 & 9.0). One looks for “rdlc” and other looks for “rdl” extension. Even if I explicitly mention the correct version number, the public key token is same for both the dlls in GAC– so I was getting the conflict always. To avoid this, I copied the dlls in my lib folder and marked as “CopyLocal” = true. This ensures on the server we will no be dependent on the installed version of these dlls. Following dlls were required for the ReportViewer to run successfully on a Win2003 box:

image