12
votes

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.

5
For your reference: In my case I have Desktop client (.Net 4.0, C#) using CR10 run-time. On 64 bits Windows (7/8), I have to install both 32 bits and 64 bits run-times and deploy my app in x86 mode to make it work.Ken Cheung
I'll see what I can do about deploying a 64bit / 32bit runtime - as I'm only maintaining the program, not even I have rights to modify the server itself. As far as my web app goes, I don't see an option to deploy it in x86 mode - it has been using 'Mixed Platforms' instead, for quite some time now. Those previous versions on the live server (which works until now) are likely also using 'Mixed Platforms'. This only seems to make this error that much stranger.zack_falcon

5 Answers

10
votes

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.

2
votes

If you deploy your app in x86 mode will work proper. i have already faced this issue.

also should have .NET framework instead of .NET Client Framework.

0
votes

I suggest:

Good luck!

0
votes

I encountered the same error when migrating a C# .Net web application from Windows 2003 to 2012.

Check to see if the system has Adobe Reader installed. After the Adobe Reader was installed, the web application started displaying the reports.

0
votes

I just checked prefer 32 bit inside Project properties > Build and it worked

enter image description here