I used the ReportViewer rendering report on a Web project, and in the native development environment, the report showed that everything was working, and when I deployed the program to another machine, I had the following error: A server error in the "/webreport" application.
Configuration error
Description: An error occurred while processing the configuration file required to provide services to the request. Please check the specific error details below and modify the configuration file appropriately. Parser error message: Failed to load file or assembly "Microsoft.ReportViewer.WebForms, version=8.0.0.0, Culture=neutral, publickeytoken= B03F5F7F11D50A3A "or one of its dependencies. The system could not find the specified file. SOURCE Error: Line: <compilation debug= "true" >
Line: <assemblies>
Line: <add assembly= "Microsoft.ReportViewer.WebForms, version=8.0.0.0, Culture=neutral, publickeytoken= b03f5f7f11d50a3a "/>
Line: <add assembly= "Microsoft.ReportViewer.Common, version=8.0.0.0, Culture=neutral, publickeytoken= b03f5f7f11d50a3a "/>
Line: </assemblies>
Source file: C:\inetpub\wwwroot\WebReport\web.config
Row: 19 assembly Load Trace: The following information helps determine the assembly "Microsoft.ReportViewer.WebForms, version=8.0.0.0, Culture=neutral, publickeytoken= B03F5F7F11D50A3A "Failed to load reason.
Warning: Assembly binding logging is turned off.
To enable assembly binding failure logging, use the registry value [hklm\software\microsoft\fusion! Enablelog] (DWORD) is set to 1.
Note: There are some performance losses associated with assembly binding failure logging.
To turn off this feature, remove the registry value [hklm\software\microsoft\fusion! Enablelog].
Version information: Microsoft. NET Framework Version: 2.0.50727.42; asp.net version: 2.0.50727.210
That's because the publisher didn't match up, and the DLL was not found in the bin directory.
The solution is to: all the DLLs under the virtual directory are copied to the bin directory. The bin directory must have the following 3 files.
1) Microsoft.ReportViewer.Common.dll
2) Microsoft.ReportViewer.ProcessingObjectModel.dll
3) Microsoft.ReportViewer.WebForms.dll