简体   繁体   中英

Why do I get a configuration error when I deploy my web application to the development server?

After upgrading NuGet from version 1 to version 2, installing a 3rd party code library and writing a small bit of code with this library, my ASP.NET application worked on my local development environment. But when I deployed it to the development server like I usually do, it gave me the below error. It seems that my assembly files were shifted around as there are many more in the bin folder than before (the old assembly files and the new third party files). There are a lot of questions regarding this configuration error, but I couldn't find one that helped my specific problem.

Server Error in '/tr' 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=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 51:     <compilation debug="true" targetFramework="4.0">
Line 52:       <assemblies>
Line 53:         <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
Line 54:         <add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
Line 55:         <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

Source File: G:\\inetpub\\trapcount\\tr\\web.config Line: 53

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

WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\\Software\\Microsoft\\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\\Software\\Microsoft\\Fusion!EnableLog].

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18067

Microsoft.ReportViewer.WebForms.dll is in the Assemblies folder in the root of the deployment. It needs to be moved to the bin folder with the rest of the assembly files.

Install below files to avoid the error.

  • ReportViewer.exe
  • ReportViewer.msi
  • vcredist_x64.exe

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM