Use Integration Kit (or Litium services) from console app

Is it possible to use the Integration Kit from a console app or anything else outside the actual Litium web application? Our use case is specifically the Integration Kit, but the question is probably about the Litium services in general.

We are using Litium scheduled tasks for integrations already, but running from outside Litium opens up other possibilities.

There’s an old question here that seems to suggest that this is possible, but I can’t find anything in the documentation.
Use IoC container in console app - Questions - Litium Forum

Also, the fact that the Integration Kit is (or was?) designed to be able to run as a Windows Service also suggests that this is possible.

Litium version: 7.6.2

In your IntegrationKit code you should have the code for the Litium.Integration.Service project also and inside that project you have an file that is named IntegrationService.cs that have a OnStart and OnStop method that is the code to start or stop Litium plattform.

The Litium.Integration.Service is used to register and run the integration kit as an Windows Service, if that application is executed directly fromt he command line it will be executed as a console application.

Note: When running outside the Litium application you need to have service bus configured, otherwise the integration application and the Litium plattform application will go out of sync and will start having a lot of strange issues.

The Litium.Integration.Service project is not present in Integration Kit 7.4.100, but it is present in Integration Kit 7.0.100. Do you mean that I should use the project from 7.0.100? Or perhaps a later version, but earlier than 7.4.100?

The startup code in 7.0.100 is

var assemblies = Litium.Foundation.Configuration.PluginsConfig.Instance.GetSolutionAssemblies();
Litium.Owin.Lifecycle.Application.Start(assemblies);

So I assume that that code + the Litium Web.config as App.config should suffice.

Yes, it’s the same startup to make the Litium platform application start and run outside of a web application. I was looking in the older version but now I remember that we removed the Windows Service project because it wasn’t used and when it was used by partners it was not possible to host it.

To consider when running as a standalone application is

  • hosting need to support this with their agreement
  • licensing, how many applications the merchant is allowed to run in their environment

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.