Could not load file or assembly Microsoft.ReportViewer.WebForms
Microsoft SQL Server 2000/2005 Reporting Services is a great tool that can be used and customized in web applications.
I have previously used ReportViewer control for displaying reports.
You can also create web forms using .NET Report-Viewer control. Designing web forms using Microsoft SQL Server Reporting Services will enhance your SQL Reporting capabilities as an ASP.NET developer in your database web applications.
Recently I have used the ASP.NET web control ReportViewer in an other web application to display reports in a customized report viewer aspx web page.
When I deployed the web application on an other IIS web server for testing purposes, I got the following error message which is indicating that the Microsoft.ReportViewer.WebForms assembly could not be loaded.
Installing the Microsoft.ReportViewer.WebForms assembly for MS Visual Studio 2005 and MS Visual Studio 2008
If this is the first time you are using ReportViewer controls within your web projects on a web server, you have to first install the ReportViewer assemblies on the deployed IIS web server.
You can find the ReportViewer installation file "ReportViewer.exe" for VS2005 projects in the following file folder on your development computer :
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\ReportViewer
For MS Visual Studio 2008 the ReportViewer installation file "ReportViewer.exe" is in the following file folder:
C:\Program Files\Microsoft Visual Studio 9.0\ReportViewer
If you copy the ReportViewer.exe on the production web server and run the setup program, you may complete the ReportViewer configuration processes. But if the application still fails then you can try copying the ReportViewer assemblies manually. Normally if the ReportViewer.exe successfully completes the setup process, the following files should be placed within the following folder:
C:\Program Files\Microsoft Visual Studio 8\ReportViewer or
C:\Program Files\Microsoft Visual Studio 9.0\ReportViewer
You can manually copy the following dll files into the application folder /bin directory. After copying the files into the application bin folder the web application will start responding successfully. And ASP.NET ReportViewer control will work on your web application.
Installing the Microsoft Report Viewer Redistributable packages 2005, 2005 SP1 (Full or Upgrade), 2008
You can find sample applications and MS SQL Server Reporting Services Report Viewer Control installer package downloads at Download Microsoft SQL Server Report Viewer Control Redistributable Packages and Sample Applications titled web page.
By downloading and running these Report Viewer Redistributable Package setup applications, the Microsoft.ReportViewer assemblies will be installed.
You can view the installed asseblies by this method at Global Assembly Cache folder C:\WINNT\assembly and check for Microsoft.ReportViewer.WebForms for example.
You should see the Microsoft.ReportViewer.WebForms with version 8.0.0.0 or 9.0.0.0