We are trying to use LaserFiche COM object in a Azure Service Fabric application. The application is a 64-bit c# .Net Core application that will run in Azure service fabric cluster.
The question is if LaserFiche COM object can run in a service fabric cluster? If possible, what steps or files are required to be included in the application to make it work?
What we have tried is to include the file Interop.LFSO102Lib.DLL as a reference in our c# application and created a test code to update document status in LaserFiche repository. When this code is executed on a local machine via Service Fabric Local cluster the code is returning the below error.
Retrieving the COM class factory for component with CLSID {FA20134C-98CA-4F93-BF9D-BC9847F25858} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
The CLSID mentioned in the above error is for LFSO102.dll which is present under "C:\Program Files\Common Files\Laserfiche\10.2\" folder. Even after including this file and all other DLL files present in the same folder the application fails with the above Class not registered error message. The section of code which is causing this error is shown below, it fails while creating LaserFiche application object.
bool lfError = false; string lfErrorMessage = ""; string lfServerName = "xxxxxxxxx"; string lfRepoName = "xxxxxxxx"; LFServer lfServ; LFDatabase lfDb; try { lfApp = new LFApplicationClass(); lfServ = lfApp.GetServerByName(lfServerName); lfDb = lfServ.GetDatabaseByName(lfRepoName); } catch (Exception ex) { lfError = true; lfErrorMessage = ex.Message; }