Answered by:

Configuration Error - Could not load file or assembly 'Microsoft.ReportViewer.WebForms'

Question

I just installed the 2.0 RC version of TeamPlain. When I go to the web access website it throws a configuration exception. It appears that it cannot find the ReportViewer assemblies. Server is Windows server 2003 R2 SP1.

-----------------------------------------

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: 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.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.

All replies

In my case, our TFS is a dual-server install, and these assemblies do not exist on the Web tier.

I was able to fix this by copying the assemblies from the Database tier into the GAC of the Web tier.

After I did that, I noticed that these same reporting assemblies are also located in the \bin folder of the devBiz install folder... not sure why it isn't finding them in that case. You might be able to just register the DLLs by dragging and dropping the relevant .dll files from the \bin folder into c:\windows\assembly folder.

We're experiencing the same issue here. I've downloaded the ReportViewer.exe, and run it on the server. Initially it wanted me to either repair or uninstall. I tried repairing, but that didn't work. Then I uninstalled and reinstalled it, and that still didn't work. We're still getting the same error as listed at the start of this thread. This is running on a 64-bit Windows 2003 Server. Could that make a difference?Rod

Another solution if you want to avoid installing s/w on the server or modifying the GAC is to set "CopyLocal" on the referenced Miscroft ReportViewer DLL's in your project.

For me, I had to also add a direct reference to Microsoft.ReportViewer.Common to the project and also specify "CopyLocal" on it too. (In the project, under references, right-click, select Properties to configure CopyLocal property)

Then, once the project is redeployed to the server, the reporting DLLs will be included in the bin folder.

This has the added advantage of working for other developers on other servers without them having to copy the DLL's themselves or install the ReportViewer s/w on the server.