Error in ASP.NET In web configuration file - asp.net

I am a java developer so don't know anything about ASP.NET. Please explain in a layman's terms.
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=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 30: <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Line 31: <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Line 32: <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 33: <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 34: <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

You can install the Microsoft Report Viewer 2010 Redistributable Package and change your references so they point to the ones installed by the package.
Microsoft Report Viewer 2010 Redistributable Package
Search the missing dll in your system
Microsoft.ReportViewer.WebForms.dll
You find them in "C:\Windows\assembly\GAC_MSIL" and put them in the references of your project.

You should add the missing assembly (DLL) references into your project "References" section and then perform the build again to check if is corrected.

Related

Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=13.0.2000.0

I have developed a simple project. where i have to print some crystal report. the project runs very well in local machine, but when i up this on a web hosting server, it shows me an error when crystal report viewing.
Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=13.0.2000.0,
Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its
dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load
file or assembly 'CrystalDecisions.ReportAppServer.CommLayer,
Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304'
or one of its dependencies. The system cannot find the file specified.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to
determine why the assembly
'CrystalDecisions.ReportAppServer.CommLayer, Version=13.0.2000.0,
Culture=neutral, PublicKeyToken=692fbea5521e1304' 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].
Please any one can help me .....
I had the same error after moving to a new laptop (Windows 10). In addition to setting Copy Local to true as mentioned above, I had to install the Crystal Reports 32-bit runtime engine for .Net Framework, even though everything else is set to run in a 64-bit environment. Hope that helps.
As I said in comment your crystaldecisions.reportappserver.commlayer.dll is not copied / present on your server. So for this you have to manually copy the dll and paste into you Bin folder
To copy a DLL from visual studio project follow the steps
1.Expand your Project's References hierarchy (Project should not be in debug mod)
2.Right Click on Particular Dll (in your case crystaldecisions.reportappserver.commlayer.dll) and select Properties and set 'Copy Local' attribute to TRUE
3 Build your project. The Dll should be there in your BIN Folder.
I faced the same issue and used the following steps to solve it
1) go Right side in solution explorer
2) Click on your Project Name
3) click on Reference
4) you can see yellow symbol on some DLL
5) Right click on that DLL and go to Property
6) Find Specific Version = True replace it with Specific Version = False
and also change Copy Local = False to Copy Local = True
CR has changed the Version No of Assemblies. The Old Version is 13.0.2000.0 (this is a incompatible version problem). The New Version is 13.0.3500.0 or 13.0.4000.0 - this is for my test case of Visual Studio 2019 and .net 4.7.2 and Window Server 2019. You need to open all your projects, Remove the old dll reference and add the new references. Then build the application again.
I learnt from source:
Best Answer: https://answers.sap.com/questions/303438/could-not-load-file-or-assembly-%27crystaldecisionsr.html
Installation Notes
Crystal Reports for Visual Studio 2017:
https://www.tektutorialshub.com/crystal-reports/crystal-reports-download-for-visual-studio/#Service-Pack-16
TO remove: Right click on an assembly under references to remove it.
This is where the error comes from - it is exactly what the error message outputs:
error message:
Could not load file or assembly ... The located assembly's manifest
definition does not match the assembly reference ...
location error message referring to:
"C:\Visual-Studio-2019-Proj\Proj Windows Inventory\Proj Windows
Inventory\obj\x86\Debug\Press HDL Windows Inventory.exe.manifest"
And it looks like this:
-The older version of .net 3.5 and CReports version="13.0.2000.0" and VS2012:
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="CrystalDecisions.CrystalReports.Engine.dll" size="372736">
<assemblyIdentity name="CrystalDecisions.CrystalReports.Engine" version="13.0.2000.0" publicKeyToken="692FBEA5521E1304" language="neutral" processorArchitecture="msil" />
-The newer version of .net 4.7.2 and CReport version="13.0.4000.0" and VS2019:
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="CrystalDecisions.CrystalReports.Engine.dll" size="373248">
<assemblyIdentity name="CrystalDecisions.CrystalReports.Engine" version="13.0.4000.0" publicKeyToken="692FBEA5521E1304" language="neutral" processorArchitecture="msil" />
Edit Web Config for each CrystalDecisions file version make it same version of the .dll file (Right-click on it and select properties within solution explorer)
For example.
crystaldecisions.reportappserver.commlayer.dll --> 13.0.2000.0
after upgrade crystal report to CRforVS_13_0_21 edit it to ---> 13.0.3500.0
Somehow I had the wrong versions of the DLLs registered in my project.
I removed the three references to the Crystal Report dlls from my project.
I right click References, and click Add Reference
In the popup window, I click the Browse menu on the left and the Browse button
In the Directory window where your DLLs reside (perhaps your application's bin directory), select the three Crystal Reports DLLs and then click Add.
Back at the Reference Manager window, click in the first column to the left of the three Crystal dlls, and then click OK
At this point your Crystal Reports should work again.
I faced the same issue when move to new laptop and used the following steps to solve it
Close the project
Install SAP Crystal Reports 13.0 runtime (32-bit) enter image description here
Delete the project .suo file
Open the Project and first built the project
Now after running the project issue is resolved.
In the first plate you have to check that:
1) You install a appropriate version of Crystal Reports SDK =>
http://downloads.i-theses.com/index.php?option=com_downloads&task=downloads&groupid=9&id=101 (for example)
2) Add reference to dll =>
crystaldecisions.reportappserver.commlayer.dll
For me it was "Prefer 32bit": clearing the checkbox allowed CLR to load Crystal Reports 64bit runtime (the only one installed).
If you already have the DLL copied to your project and the Copy Local flag is in true, the solution should be just rebuild the project. That will copy the DLL to the bin folder.
For visual studio 2019
change the code in aspx.cs page
<%# Register Assembly="CrystalDecisions.Web, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
in web config:
<configSections>
<sectionGroup name="businessObjects">
<sectionGroup name="crystalReports">
<section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null"/>
</sectionGroup>
</sectionGroup>
</configSections>
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Shared, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Web, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
<add assembly="Microsoft.ReportViewer.Common, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Shared, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Web, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</assemblies>
<buildProviders>
<add extension=".rpt" type="CrystalDecisions.Web.Compilation.RptBuildProvider, CrystalDecisions.Web, Version=13.0.4000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
</buildProviders>
If you have the to your project and the Copy Local flag is in true, the solution should be just the project. That copy the DLL to the bin folder.

Getting error: Could not load file or assembly 'System.Web.Routing, Version=4.0.0.0,

Hello everyone I am getting some error on my website when i upload it on server. It gives me this error on line number 29
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 'System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 27: <compilation debug="true">
Line 28: <assemblies>
Line 29: <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Line 30: <add assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 31: </assemblies>
Please tell me why it is happening
Set Copy Local to True on your System.Web.Routing reference, that means it'll be pulled across as part of your deployment.

Configuration Error in asp mvc 2 project. MvcContrib, Version=2.0.96.0

Could not load file or assembly 'MvcContrib, Version=2.0.96.0' or one of its dependencies.
I am getting this error on my project which is created by some else and I am debugging this on my computer.
I think I know what the problem is, I need to get MvcContrib, Version=2.0.96.0 but I am working on visual studio 2008 and there is no package library installer on it.
How to do this ??
This is how the message comes up.
Parser Error Message: Could not load file or assembly 'MvcContrib, Version=2.0.96.0' or one of its dependencies. The system cannot find the file specified.
Line 46: <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Line 47: <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Line 48: <add assembly="MvcContrib, Version=2.0.96.0"/>
Line 49: </assemblies>
Line 50: </compilation>
Download form here: MVC 2 - 2.0.96.0 & refer the dll in your application.

Error while deploying ASP.net website

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 'Office, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 43: <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Line 44: <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Line 45: <add assembly="Office, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"/>
Line 46: <add assembly="Microsoft.Office.Interop.Word, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"/></assemblies>
Line 47: </compilation>
Source File: C:\inetpub\wwwroot\toolbar\web.config Line: 45
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Office, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' 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].
Can Anyone help me to solve this problem??I am using windows server 2008 to deploy my website.
Set to Office assembly at your references CopyLocal property to true or put it to hosting manually.
Have you installed the Microsoft Office Primary Interop Assemblies? If not, they are available here:
http://msdn.microsoft.com/en-us/library/aa159923(office.11).aspx

Where to get and how to install (or migrate) missing assemblies for ASP.NET server?

I am migrating web apps to new hosting servers, but when I try to access them to test on the new server, I get all these assemblies not found errors like:
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 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 28: <compilation debug="false">
Line 29: <assemblies>
Line 30: <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 31: <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
Line 32: <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
Does anyone know where you find these to install or how to migrate them over?
That's part of the ASP.Net AJAX kit.
You will have to either install the ASP.AJAX kit on the server, or include the assemblies in your project. This question and this question say you how you can include the libraries as DLL or JS.

Resources