Applying a license using a command line

As an alternative to applying the license in the License Management form, you can use the ApplyMongooseLicense.exe utility to apply a license document to the application database of a specified configuration using a command line interface.

Note: This topic and this utility are applicable only for on-premises environments.

Utility location

This utility file must reside in the executable folder of a Mongoose-based application's admin client or Application Server, and the file must be run from that location. The IDO Runtime Service or equivalent IDORuntimeHost must also be running on that machine. If not, you receive an error message when you try to apply the license:

Error processing an IDO request (Protocol=Ipc): Communication error executing IDO request: Failed to connect to an IPC Port: The system cannot find the file specified.

Running the command

To run ApplyMongooseLicense.exe as a command line utility, use this syntax:
ApplyMongooseLicense –config:config_name {-license:license_document | -licensefile:filename}

To apply a new license, use only one of these options:

  • -license: Specifies an actual license document
  • -licensefile: Specifies a path/file containing a license document

To reapply the current license, specify the command without either of those options.

If any arguments are provided that do not match the required parameters, then a “Usage” message is displayed to show the required format:

Usage: ApplyMongooseLicense <parameters> where <parameters> represents:
 -help: Displays this usage text. If specified, only parm required.
 -config: Config name (required)
 -logfile: Path/filename of logfile (optional)
One of the following to apply new license or neither if reapplying current
 -license: A license document
 -licensefile: Path/filename containing a license document

If the license is successfully applied, the command line utility returns an exit code of 0. Otherwise, it returns -1. If the license application is successful, a success message is displayed on the console.

Troubleshooting

These conditions can cause an error when you run the utility:

  • Insufficient or invalid parameters are specified for the command line.
  • The specified configuration does not exist.

    In this case, this message is displayed when the utility tries to connect to the configuration:

    [Machine_Name] NullReferenceException exception processing 'OpenServiceSession' request: Object reference not set to an instance of an object.
  • The license document is invalid or does not match the server and database name to which it is being applied.
  • The IDO Runtime Service, or equivalent IDORuntimeHost.exe, is not currently running on this computer.
  • The ApplyMongooseLicense.exe utility is not being run from the installed Mongoose executable folder. This utility is dependent on other assembly files that exist in this folder.
  • If neither -license or -licensefile is specified and no license document is currently installed, this message displays:
    Reapply License Failed: Reason = License is missing or invalid