System.Configuration.ConfigurationErrorsException: Could not load file or assembly ‘Microsoft.ReportViewer.WebForms, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.
Do you ever see this problem when you try to load ASP.NET web application? Well, based on the error code. It should have something related to ReportViewer. It seem like the ReportViewer component is not found.
I don’t have the problem during development at my development server. However, I faced this problem when I deploy to another machine. Why is this happening?
Here is the solution…
- Get the required files from your development server – C:\Program Files\Microsoft Visual Studio 8\ReportViewer (default path for Visual Studio 2005).
- Copy Microsoft.ReportViewer.Common.dll, Microsoft.ReportViewer.WebForms.dll, Microsoft.ReportViewer.WebForms.xml, Microsoft.ReportViewer.WinForms.dll and Microsoft.ReportViewer.WinForms.xml.
- Paste it at your web application bin folder.
This should do the trick.