Report Viewer 2005 SP1

by kkikta 10. December 2008 15:29

Yesterday I was loading out a new version of some code on a new server and found out that the report viewer was having an error. There were multiple problems but the biggest to were the missing DLL's in the GAC which are in the attached file and missing directory permissions on the c:\windows\temp folder. Below are the error messages and the solution of each.

  1. Error Message: Microsoft.Reporting.WebForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report 'Main Report' is invalid. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred while compiling expressions. Native compiler return value: ‘[BC2001] file 'C:\WINDOWS\TEMP\nkty97-c.0.vb' could not be found’.

    Solution: Locate the windows temp directory (c:/windows/temp) and give the user (ASPNET) that's running the AppPool modify access to the folder.

  2. Error Messages:
    • System.Web.HttpCompileException: d:\somepath\Reports.aspx.cs(127): error CS0117: 'Microsoft.Reporting.WebForms.ReportViewer' does not contain a definition for 'Reset'
    • System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

    Solution: Register the following dll's in the GAC, they can generally be found at "C:\Program Files\Microsoft Visual Studio 8\ReportViewer"
    1. Microsoft.ReportViewer.Common.dll
    2. Microsoft.ReportViewer.WebForms.dll
    3. Microsoft.ReportViewer.WinForms.dll

    This can be done using the following command "gacutil /if <file>". gacutil.exe and gacutil.exe.config can be found at "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin"

    Once this is done restart IIS and you should be done. Also for convenience the files are attached.

ReportViewer.zip (1.50 mb)

Tags:

.NET | General

Month List

Page List