SOLVED: Crystal Reports NOT LOADING PLESK ONYX 12.5

PROBLEM:

We've a WPF application written in .NET 3.5 using Visual Studio 2010. The solution consists of 8 projects - all compiled in .NET 3.5. The application uses Crystal Report. Target OS is Windows 7.
Recently, the startup project is compiled in .NET 4.0 due to some 3rd party DLL dependency - those DLLs require .NET 4.0. After this change and rebuilding the solution, Crystal Report is throwing exception.
The problem occurs at the constructor of ReportClass.
Exception's message:
The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception.
InnerException's message:
"Retrieving the COM class factory for component with CLSID {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))."
I haven't worked in Crystal Report before. What could be the cause of this problem?
Please note that this problem doesn't occur when compiled as .NET 3.5. Crystal Report is used in the startup project.
we have an application written in .NET 4.0 which uses this SAP Crystal Reports. While the same build (x86) is working perfectly OK in Windows 2003/2008 (both x86/x64) with .NET 4.0 framework installed (x86) and CrystalReports runtimes installed (donwladed from SAP pages http://scn.sap.com/docs/DOC-7824) using the 13.0.1.x (32bit_13_0_1.msi).
When the same stuff is installed in MS 2012 server (x64), there is already .NET framework 4.5 pre-installed, thus I was not able to install .NET 4.0, however it looks like it's backwards compatible, because the application is working properly, with exception of the Crystal Reports part, where the application throws an exception.
Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version 10.5.3700.0, culture=neutral, PublicKeyToken=blahblah' or one of its dependencies. The system cannot find the file specified.
Of course the runtimes are installed, but for some reason our application can't recognize those DLLs. Personally I don't think it's a build issue as it works properly with same configuration in 2003/2008 server.
We have there only release version installed, so no debugging options are available, nor VS is installed.
Basically we're just performing some tests if the application works properly in 2012 server, but this issue seems impossible to solve. I've spent hours on Google to no avail. So any idea what to check is highly appreciated :)
I have an application that uses Crystal Reports downloaded from SAP for Visual Studio 2012.
When I debug the software in Visual Studio it works perfectly fine, but when I deploy it and want to view the Crystal Report, I get the following error:
Server Error in '/' Application.

Retrieving the COM class factory for component with CLSID {4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B} failed due to the following error: 80040154.
What is the problem and how to resolve?
please reply

SOLUTION:


  • Open windows registry (Regedit.exe)
  • Search for 4DB2E2BB-78E6-4AEA-BEFB-FDAAB610FD1B
  • You should find a key, expand it and go to each child nodes until you find the installation path.
  • Go to that path (usually C:\Program ...\Business Objects...\bin...)
  • Grant full permission for ASP .NET, IIS worker process, Anonymous Web User process accounts
    You should be good to go.
  • Create file permissions.xml in %plesk_dir%\etc\DiskSecurity\ with the following contents:
    
    :
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 1999-2016. Parallels IP Holdings GmbH. All Rights Reserved. -->
<Entries>

<!-- Crystal Reports -->
<Entry AccounType="1" Account="Psacln" Path="C:\Program Files\" SubPath="SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86"
 AceFlags="ThisFolderSubfoldersAndFiles" AccessMask="FullAccess" EntryFlags="0x0" />

<Entry AccounType="1" Account="Psaadm" Path="C:\Program Files\" SubPath="SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86"
 AceFlags="ThisFolderSubfoldersAndFiles" AccessMask="FullAccess" EntryFlags="0x0" />
<!-- 7 ZIP -->
<Entry AccounType="1" Account="Psacln" Path="C:\Program Files\" SubPath="7-Zip"
 AceFlags="ThisFolderSubfoldersAndFiles" AccessMask="FullAccess" EntryFlags="0x0" />

<Entry AccounType="1" Account="Psaadm" Path="C:\Program Files\" SubPath="7-Zip"
 AceFlags="ThisFolderSubfoldersAndFiles" AccessMask="FullAccess" EntryFlags="0x0" />
</Entries>


  1. Run the ApplySecurity.exe utility:
    "%plesk_bin%"\ApplySecurity.exe --apply-to-directory --directory="C:\Program Files"

This file will be read during re-applying permissions by Plesk repair utility when it is either called directly from CLI or by Plesk Reconfigurator utility: 

plesk repair --directory-permissions -directory "C:\Program Files"
Please refer to following Plesk documentation for more details:

Post a Comment

0 Comments