Skip to Content
avatar image
Former Member

VS 2017 CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception

Hi ,

I'm strugling with the below error

ERROR - An error has occurred in the system. System.TypeInitializationException: The type initializer for 'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an exception. ---> System.Runtime.InteropServices.COMException: 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)). at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() --- End of inner exception stack trace --- at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() at Vdine.WebApp.UI.Web.Modules.Inventory.ReportsView.PopulateReport() at Vdine.WebApp.UI.Web.Modules.Inventory.ReportsView.Page_Init(Object sender, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnInit(EventArgs e) at System.Web.UI.Page.OnInit(EventArgs e) at System.Web.UI.Adapters.ControlAdapter.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I have build my project on VS 2017 AnyCPU and for my DEv machine I'v installed crforvs _13_0_21 EXE in my dev machine, so all report generation and loading workes perfectly fine in the dev environment.

But when i deploy my website on server which is 32 bit and have the CRRuntime_32bit.msi which was for the VS 2017, the above error gives.

Please help me out to sort out this issue.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 23 at 10:44 PM

    Did you set IIS to run in 32 bit mode?

    App pool also needs to be set to 4.0 Framework or above.

    Don

    Add comment
    10|10000 characters needed characters exceeded