Network Floating Licensing Tutorial

Important

Network floating licensing is no longer supported in Instant Protection PLUS 3. We highly recommend considering another solution such as Protection PLUS 5 SDK for your network floating licensing needs, as these do not have the same limitations as Instant Protection PLUS 3. Contact us for more information.

Using Network Floating Licensing with applications protected with Instant Protection PLUS 3 is subject to certain limitations:

This tutorial will walk through setting up an Instant Protection PLUS 3 protected application to run over a network. Basic network licensing can be achieved by proper configuration of the Instant Protection PLUS 3 as shown in the "Setting up Instant Protection PLUS 3" steps. In order to control the number of concurrent network users using our Network Floating model, you must use the Instant Protection PLUS 3 API. All workstations will need to have read/write/execute permissions to the license file and semaphore files on the network share. Setting up a file server, network share, and the necessary permissions is beyond the scope of this manual.

Setting up Instant Protection PLUS 3

This section only outlines the required options for network licensing. Refer to the rest of this manual and/or the descriptions in the Instant Protection PLUS 3 wizard when configuring the options not specified here.

  1. On the License File Options page, you will need to select either "Pre-create in the application folder" or "Auto-create in the application folder" for the License File Location.
  2. On the Trial Options page, you should uncheck "Track last used time along with date" if you are using license file aliases (set on the License File Options page).
  3. On the Copy-Protection Options page, you should select "Use Legacy Computer ID Algorithms" and choose the Hard Drive Serial and NetName algorithms.
  4. On the Wrapper Settings page or the File Output page (if using the Instant Protection PLUS 3 DLL) select "Use the Instant Protection PLUS 3 API".

Network floating licensing using the Instant Protection PLUS 3 API

Please review the section on using the API. We include three different samples written in C#, VB.NET, and VB6 that demonstrate how to implement our Network Floating model for controlling concurrent access to your application over a network. The samples can be found in the following installation directories:

It is also possible to use most programming languages that are able to call Win32 DLLs to implement network floating licensing.

When using the Instant Protection PLUS 3 DLL, passing the FLAGS_USE_XML_PATH (4) flag to CallIp or CallIpEx can be used to make the Instant Protection PLUS 3 DLL treat the directory containing the encrypted XML file as the application directory. So in effect, this allows you to install your application locally on computers, while storing the license file on a network location that also contains the encrypted XML file. The only drawback to keep in mind with this approach is that any supporting files (like a splash screen image, product logo, or language files) would also be loaded from this location, which would increase network traffic if such files are used.

The WR_SemOpen() function is used to "check out" a network user from the Allowed LAN Users pool. This function will attempt to create a locked network semaphore file on the network share and will return '1' (success) if the function succeeds and it is safe for the application to run. This function will return '23' (ERR_NET_LIC_FULL) if the number of Allowed LAN Users has been reached.

You can optionally call the WR_SemTest() function periodically to ensure the network semaphore file is still valid.

When the application shuts down, the WR_SemClose() function is used to "check in" the network user to the Allowed LAN Users pool. This will allow another LAN User to have access to the application. If the application terminates abnormally and this step is not completed, Windows will detect the process that locked the network semaphore file is no longer available and will automatically release the lock giving access to another LAN user. The semaphore file may not be deleted in this case, but it is still available for use until the next LAN user locks it.

When the application shuts down, you will also need to call the WR_Close() function to shut down the Instant Protection PLUS 3 API.

Testing the VB6 sample

  1. Open the NetFloat.vbp VB6 project and compile the executable using File / Make NetFloat.exe.
  2. Open the NetFloat.ipp Instant Protection PLUS 3 Project and click Finish or step through the wizard to edit the settings being used. This will wrap the compiled executable and place the result in the \wrapped\ directory.
  3. Upload the wrapped executable to a network share where all workstations have read/write/execute permissions.
  4. Run the application over the network and activate using the steps listed below to enable X LAN Users, where X is the number entered in the event data field during activation code generation.
  5. Verify only X instances of the application are able to run at any given time.

Testing the C# or VB.NET sample

  1. Open the C# or VB.NET IPNetFloatSample project and compile the executable.
  2. Upload the compiled executable to a network share where all workstations have read/write/execute permissions.
  3. Run the application over the network and activate using the steps listed below to enable X LAN Users, where X is the number entered in the event data field during activation code generation.
  4. Verify only X instances of the application are able to run at any given time.

Activating the application

When activating the application, you must specify how many concurrent users are allowed for the license being activated.

Activating with SOLO Server

To activate the application automatically with SOLO Server, you will need to create a Product Option with the following settings:

Trigger Code 6 will activate the application in retail (full) mode and set the Allowed LAN Users to the value entered in the License Counter Value. This will allow that many number of users to run your application simultaneously over the network. If you only want to change the number of allowed concurrent users in the license file without activating the application, use Trigger Code 16.

The License Counter Source can alternatively be set to "Quantity" which would allow the user's shopping cart purchase to determine the number of concurrent users.

Important

If the application will need to be ran locally on the server, such as in a peer-to-peer environment, you will need to access the application on the server using the UNC path to the network share, just like a workstation would. Otherwise you will need to activate the server as well.

Activating manually

To activate the application manually (by phone/fax/email), click the Generate activation codes tab in Instant Protection PLUS 3 after you have either protected your application or loaded your ".ipp" file. Trigger Code 6 will activate the application in retail (full) mode and set the Allowed LAN Users to the value entered in the Data Field(X). This will allow that many number of users to run your application simultaneously over the network. If you only want to change the number of allowed concurrent users in the license file without activating the application, use Trigger Code 16.