Running LiveView Server as a Windows Service

This topic describes how to create and activate a LiveView Service entry on Windows, and how to activate that service. LiveView can only be started with a compiled project with a minimal configuration, so you will need to have a configured project that you want to have running as the Windows service.

Creating the LiveView Service

A Windows service is an executable that can be set to run automatically when Windows is booted, and to remain running as a background process. This example creates a service for running the Hello LiveView sample project.

  1. Open a StreamBase Command Prompt as administrator.

  2. Navigate to the directory that contains the Hello LiveView project directory in your Studio workspace. The following example on Windows show the location of the Hello LiveView sample as loaded into the Studio workspace of the user named sbuser:

    cd "C:\Users\sbuser\StreamBase Studio 7.5 Workspace\sample_lv-helloliveview"
    
  3. Use the lv-server command with its install-service option. The following example uses a period to specify the current directory as the LiveView project to load (assuming you have navigated there as shown in step 2). The command specifies the service name hellolv and service display name Hello LiveView.

    lv-server install-service . --service-name "hellolv,Hello LiveView"
    

Activating the LiveView Service

To activate the default installed LiveView service so that it starts at Windows boot time:

  1. Open the Windows Services control panel, as shown in the example below.

  2. Locate the Hello LiveView entry.

  3. To start the service one time for testing, click the Start the service link on the left, or right-click and select Start.

  1. To start the service every time Windows restarts, follow these steps:

    1. Double-click the entry. This opens the Properties dialog, like the example below.

    2. In the Startup type drop-down list, select Automatic.

    3. If you need to be able to run the service as a particular user, click the Log on tab and enter your username and password.

Removing a LiveView Service

If you need to remove a LiveView service, open a StreamBase Command Prompt as administrator, and run another lv-server command, this time using the remove-service option. To identify the service to remove, specify only the short service name in the first argument you gave with the install-service option. For example:

lv-server remove-service --service-name hellolv