Deploying to test and production systems

Ibex runtime keys

Applications should be installed into production environments using a runtime key. Developer licenses should not be installed on test or production systems.

An Ibex developer license file (called xmlpdf.lic) is in XML format and contains an attribute called "runtimekey". This is a string looking something like this "000200507288C93A81CCXTTRCTRDZMYVZEJK7RPA==".

Runtime key usage

To activate the key, pass it to the ibex4.licensing.Generator.setRuntimeKey() API before any FODocument objects are created, like this:

using ibex4;

public class test {

 	static void Main( string[] args ) {

		string key = "000200507288C93VZEJK7RPA==";

		ibex4.licensing.Generator.setRuntimeKey( key );
		FODocument gen = new FODocument();
		
		gen.generate( "test.fo", "test.pdf" );
 	}
}

To build the above code from the command line follow the following steps:

  1. Create a new project class, for example, "testibex"

    dotnet new console --name testibex

  2. change to the project directory

    cd testibex

  3. add a reference to Ibex

    dotnet add package Ibex.PDF.Creator

  4. edit the Program.cs file created when the project was created and replace its contents with this:
    using ibex4;
    
    public class test {
    
    	static void Main( string[] args ) {
    
    		string key = "000200507288C93VZEJK7RPA==";
    
    		ibex4.licensing.Generator.setRuntimeKey( key );
    		FODocument gen = new FODocument();
    		gen.generate( "svgradial.fo", "svgradial.pdf" );
    	}
    }
    							
  5. build the project

    dotnet build

  6. Download these two test files and save them into the testibex directory

    svgradial.fo radial.svg

  7. Execute the program, creating svgradial.pdf

    dotnet run

Obviously the key in the code above is not a real runtime key, you will need to insert your own key.

Ibex checks whether the runtime key is in use the first time an FODocument object is created. If you deploy your application to IIS you may need to restart IIS the first time you use the runtime key.

Set the runtime key only once.

The runtime key sets a static variable in memory within your application. It only needs to be set once when the application starts running, not once for every FODocument object created.

Copyright (c) 2002-2023 Visual Programming Limited