19 March 2012

C# - Error: Could Not Load File Or Assembly 'Microsoft.ReportViewer.WebForms, Version=9.0.0.0

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. 

Solution 
This error means you're using the SQL Server Reporting Services/Crystal Reports  ReportViewer control in your web application, and the server can't find the proper DLL. All you have to do is deploy them to your server. With Visual Studio 2008, the location of the ReportViewer DLLs has changed. 
You now find them at C:\Program Files\Microsoft Visual Studio 9.0\ReportViewer.
The first way to get these on your server, and this only works if you run your own server, is to directly copy them into the C:\Windows\assembly folder, and reboot the server (this reloads the GAC). If a reboot is out of the question, you can use GACUTIL.EXE to copy and register the DLLs. 
If you're in a shared hosting environment, reference the DLLs from the VS 9 path listed above, and set the Copy Local=True (select the DLL and open the Properties tab). This will copy the DLLs into your applications BIN folder, and look for them there first. You can then deploy to a shared host, making sure to copy all the contents of BIN.


Dll name 
paste following dll in bin folder or windows folder
1> Microsoft.ReportViewer.Common.dll
2> Microsoft.ReportViewer.ProcessingObjectModel.DLL
3> Microsoft.ReportViewer.WebForms.dll
4> Microsoft.ReportViewer.WinForms.dll

No comments:

Post a Comment