Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An Error Has Occured while attempting to load the Crystal Reports runtime

I've been working on an internal website for quite some time now, maintaining it for a client. Other than a few bugs, the website is working as intended.

But then, all of a sudden, the error in question appears. This has never happened before.

Here are the software we used:

  • Windows Server 2008 R2, 64bit
  • Visual Studio 2005 as the IDE of choice
  • ASP.net / C# for the website
  • .NET 2.0
  • IIS, for the website hosting.
  • CrystalReport10, it would appear (from the picture).

Now, I have done some research on this, and a lot of people suggest re-building / publishing the website as x86 instead of any CPU, and a lot of people also suggest re-installing 64-bit CR, etc., etc.

But again, this has never happened before, and very few people actually tamper with the server. I see no reason why the website, which has been built using 'Mixed Platforms' since long before my time, would suddenly cease operating on the OS it was deployed to, also long before my time. As no one else uses that server, how could it suddenly generate such an error? It's not like someone can just go in there and uninstall stuff - Windows Update, maybe?

Here's a screenshot of what I found on the OS in C:\Windows\Assembly:

Windows Server 2008

Strange thing is, I found the same thing on my local test dev PC, with the addition of some version 13 parts for another program I'm working on. The website works fine on my local test dev. On the live server, it does not. Before I assume that perhaps I have something necessary that the server does not, I also made myself remember that whatever was on the live server has been there for awhile - and the error only started happening now.

And here's the error in full:

Server Error in '/' Application.

An error has occurred while attempting to load the Crystal Reports runtime.

Either the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.

Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required. Please go to http://www.businessobjects.com/support for more information. 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: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: An error has occurred while attempting to load the Crystal Reports runtime.

Either the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.

Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required. Please go to http://www.businessobjects.com/support for more information.

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.

Stack Trace:

[LoadSaveReportException: An error has occurred while attempting to load the Crystal Reports runtime.

Either the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.

Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required. Please go to http://www.businessobjects.com/support for more information.]
CrystalDecisions.CrystalReports.Engine.ReportDocument.CheckForCrystalReportsRuntime() +379 CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() +248

[TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.]
CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() +0
pages_reports_ApplicationHistoryRpt.GenerateReport() +163
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5420

I hope someone can help me with this.

Thanks.

like image 369
zack_falcon Avatar asked Oct 10 '13 03:10

zack_falcon


1 Answers

Have you tried going into IIS and setting "Enable 32-Bit Applications" to "True" in the Advanced Settings of the application pool that the web site is running under?

I have to do this for the Crystal Reports 2008 (12.0.2000.0) version that I reference in my web application as the Crystal runtimes themselves are only 32 bit.

like image 74
Ally Avatar answered Sep 21 '22 15:09

Ally