You are viewing limited content. For full access, please sign in.

Question

Question

How to use LaserFiche COM object in Azure Service Fabric application

asked on November 15, 2019

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;
}
0 0

Replies

replied on November 15, 2019

COM objects need to be registered. If you are just copying dlls onto the machine, you are missing this step. The supported way to do this is by running the redistributable installer on the target machine. This will also take care of installing any dependencies.

For new development, the .Net Repository Access library is recommended over the COM one.

1 0
replied on November 15, 2019

I should have read more closely - RA is not currently compatible with .Net Core. We hope to have a version that is in the future.

1 0
replied on November 18, 2019

Using RepositoryAccess library I had some success while testing via local cluster. There is login/authentication issue which we need to resolve based on our company policy, but it seems RepositoryAccess library is working in service fabric application.

 

We still need to test by deploying the application to Azure cluster to be 100% sure but the tests so far on local cluster (i.e. replica used on local machine for testing) looks promising.

1 0
replied on November 18, 2019

Thanks for the update - please let us know how it goes!

0 0
replied on November 15, 2019

With with Azure Service Fabric application it seems that separate installation is not possible. That is why DLLs are included within application package to see if they auto register within the Azure Service Fabric Cluster on execution.

We can try with .Net Repository Access library, will this also require separate registration?

 

0 0
replied on November 18, 2019 Show version history

Is having your Azure Service Fabric application call Azure Functions v1.x an option?

Azure Functions 1.x supports .NET Framework 4.7, which should allow you to use the Repository Access (RA) .NET libraries.

You could transition to Azure Functions v2/3 or Service Fabric if and when RA has .NET Core support in the future.

0 0
replied on November 15, 2019

Brian, can the .Net Repository Access library be used without installing the SDK runtime ?

0 0
replied on November 18, 2019

You may be able to use registration-free COM. I don't have any experience with it, but it's meant to solve this kind of problem.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.