Crystal report related problem on server - asp.net

I uploaded my project on server then i am facing the following problem, while it does wok fine on local.
Could not load file or assembly 'CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
What is this problem please let me know
<customErrors mode="Off"/>
Line 67: <httpHandlers>
Line 68: <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
Line 69:
Line 70: <remove verb="*" path="*.asmx"/>

Make you installed the Crystal package on the web server, or include them in your app's bin directory. Also make sure you installed that same specific 10.2.3600.0 version on the server or you will have to do assembly binding redirects.

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.

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.

Crystal Reports "Load Report Failed" error running report on the server

I am getting error "load report failed" on server, it runs without error on localhost. I am using VS 2008 with .Net 3.5.
This is my code:
ReportDocument reportDocument = new ReportDocument();
String filePath = #"C:\abcSpaces\abc.com\xyz.com\wwwroot\Order Fulfilment.rpt";//full path
// I have tried OrderFullfilment.rpt and ~/OrderFullfilment.rpt and /OrderFullfilment.rpt
try
{
reportDocument.Load(filePath);
CrystalReportViewer1.ReportSource = reportDocument;
}
catch(Exception ex){
Label1.Text = ex.Message;
}
Aspx Page part:
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" Height="1291px"
ReuseParameterValuesOnRefresh="True" Width="1125px" />
^I have tried using
<CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
<Report FileName="expenseRep_summary.rpt">
</Report>
</CR:CrystalReportSource>
with no luck off course...
my web.config section for referencing assemblies:
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="MySql.Data, Version=6.2.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
<add assembly="MySql.Data.Entity, Version=6.2.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
<add assembly="MySql.Web, Version=6.2.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
<add assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/><add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.Framework, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Enterprise.InfoStore, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Data.AdoDotNetInterop, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
<add assembly="CrystalDecisions.VSDesigner, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/></assemblies>
</compilation>
I have tried all of these solutions posted in stackoverflow:
CrystalReport Load report failed (no I can't change registry or re-install crystal reports, my site is hosted on external server)
load report failed (where the hell is objReport??)
I got the problem in Crystal Report- Error Messsage:Load report failed (I have no object reffering to Report class :S)
Load report failed when implementing crystal report in asp.net 3.5 (I tried this '~' technique + Absolute path and none works)
Load report failed in Windows server 2003 (I have set read write execute permissions to every file)
https://stackoverflow.com/questions/3337185/crystal-report-giving-load-failed-error (this guy like me, hasn't found the solution yet :P )
So please please please help me! Or my client will eat me alive...
I know this is an old post. but For anyone still looking for the answer:
You need to register crystal reports in page markup
<% # Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
Set the property 'Copy to Output Directory' of the report to 'Copy always'
the path of the file in the crystalreportsource will be ~/bin/YOURFOLDER/YOURFILE
<CR: CrystalReportSource ID ="CrystalReportSource1" runat ="server">
<Report FileName="~/bin/oilmovement/rptOMDayEnd.rpt">
</Report>
</CR: CrystalReportSource>
Now the report should work
select your application pool for your apllication or website
Click on Recycling (Right side panel)
Reduce the value of Regular time interval 1740 to 20 min or set your desire value you want
this will release any resource hold by iis.
restart iis.
hope this will fix your problem
http://littleprograming.blogspot.com/2013/02/crystal-report-error-load-report-failed.html
I have the same issue before and it seems you need to install the CR runtime on the server. Having just the DLL is not enough. Hope it helps.
I know that this is an old question, but today I had similar problem.
Reports were working locally but when deployed to server (IIS) I had the same error.
Try to add write/read permissions to %TEMP% for IIS User (process that creates reports).
Reports are generated in Temp and from there viewer is getting content that is displayed on site.
I also had that problem and after exhausting all other options changed the Application Pool setting Load User Profile from False to True, which resolved the problem.
This was on an application which has been deployed to dozens of IIS6, IIS7, IIS7.5 servers and we've never encountered the problem before. The App Pool was running with the identity Network Service (which it usually is) and I first tried giving permission to C:\windows\temp which did not work (although I didn't check if that really was the temp directory).
I suspect another solution may have been to add Network Service to the IIS_IUSRS group, but I didn't try that and didn't really want to do so in case it affected other apps on the server.
On of the most common reason can be, Crystal Report (*.rpt) files are not physically present in the target location, which might have left-out during build and publishing application
Solution:
Open Visual Studio, select all the CrystalReport.rpt files, right click to set Properties"
Build Action: Content (can also be Embedded Resource)
CopyToOutputDirectory: Always (can also be Copy if Newer)

Crystal Reports + Asp.net 2.0

I having a problem in crystal reports xi release 2 + visula studio 2005 with sp1
the error it's giving is this:
Parser Error Message: Could not load file or assembly 'CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
on line 50:
<httpHandlers>
<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</httpHandlers>
I dont know what to do, please help
Answer---> deploy the Crystal Reports .NET components to the web server
Go and check out this thread, seems a lot of other guys have had the same problem.
http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/b0fc930f-5fc8-4475-bfe7-ad56616e838d

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