ASP.NET - Configuration Error - Asked By Sudhansu shekhar on 25-Dec-11 10:13 AM


 Hi All,

 Can any one help me out, I'm trying to run my application in asp.net 2010. But I got frustrate to solve this following error;-

Thanks
 

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 52: 				<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 53: 				<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Line 54: 				<add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 55: 				<add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 56: 				<add assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>

Source File: C:\Users\User\Desktop\SWISS_UPDATE\Code\web.config    Line: 54

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.

=== Pre-bind state information ===
LOG: User = USER-PC\User
LOG: DisplayName = Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/Users/User/Desktop/SWISS_UPDATE/Code/
LOG: Initial PrivatePath = C:\Users\User\Desktop\SWISS_UPDATE\Code\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\User\Desktop\SWISS_UPDATE\Code\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:/Users/User/AppData/Local/Temp/Temporary ASP.NET Files/code/5c003841/8f8e0194/Microsoft.ReportViewer.WebForms.DLL.
LOG: Attempting download of new URL file:///C:/Users/User/AppData/Local/Temp/Temporary ASP.NET Files/code/5c003841/8f8e0194/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.DLL.
LOG: Attempting download of new URL file:///C:/Users/User/Desktop/SWISS_UPDATE/Code/bin/Microsoft.ReportViewer.WebForms.DLL.
LOG: Attempting download of new URL file:///C:/Users/User/Desktop/SWISS_UPDATE/Code/bin/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.DLL.
LOG: Attempting download of new URL file:///C:/Users/User/AppData/Local/Temp/Temporary ASP.NET Files/code/5c003841/8f8e0194/Microsoft.ReportViewer.WebForms.EXE.
LOG: Attempting download of new URL file:///C:/Users/User/AppData/Local/Temp/Temporary ASP.NET Files/code/5c003841/8f8e0194/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.EXE.
LOG: Attempting download of new URL file:///C:/Users/User/Desktop/SWISS_UPDATE/Code/bin/Microsoft.ReportViewer.WebForms.EXE.
LOG: Attempting download of new URL file:///C:/Users/User/Desktop/SWISS_UPDATE/Code/bin/Microsoft.ReportViewer.WebForms/Microsoft.ReportViewer.WebForms.EXE.


Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
Riley K replied to Sudhansu shekhar on 25-Dec-11 10:26 AM

This error means you're using the SQL Server Reporting Services 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.


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

Regards.

Suchit shah replied to Sudhansu shekhar on 25-Dec-11 11:15 AM
All you need to do is install the Redistributable package on the target web server for your version of report viewer. link to Download Microsoft ReportViewer.exe 
http://www.microsoft.com/downloads/details.aspx?FamilyID=CC96C246-61E5-4D9E-BB5F-416D75A1B9EF&displaylang=en
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
Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.WebForms.dll
Microsoft.ReportViewer.WebForms.xml
Microsoft.ReportViewer.WinForms.dll
Microsoft.ReportViewer.WinForms.xml


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. 


Venkat K replied to Sudhansu shekhar on 25-Dec-11 01:01 PM
The error occur because it doesn't find the respective dll or component on your server where the application is deployed,
You need to install the Redistributable package on your sever where you have deployed the application, and once configured you need to restart the IIS to get it work:

For reference: http://www.davidsandor.com/post/2009/07/16/Could-not-load-file-or-assembly-MicrosoftReportViewerWebForms-Version=9000-Culture=neutral-PublicKeyToken=b03f5f7f11d50a3a-or-one-of-its-dependencies.aspx

Thanks
Jitendra Faye replied to Sudhansu shekhar on 25-Dec-11 11:26 PM

Solution1 :

The assembly is installed by ReportViewer.exe, you can download it here:

http://www.microsoft.com/downloads/details.aspx?familyid=8a166cac-758d-45c8-b637-dd7726e61367&displaylang=en

For Visual Studio 2005, it is located in:

C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\ReportViewer\ReportViewer.exe


Solution2 :

Remove the reference to Microsoft.ReportViewer.WebForms.XmlSerializers. Then add fresh reference. The DLL location is,

C:\Program Files\Microsoft Visual Studio 9.0\ReportViewer\Microsoft.ReportViewer.WebForms.dll

Hope this helps you.