NetworkFloatingLicense Sample

Before evaluating this sample, please read the topic on Understanding Network Floating Licensing.

Overview

The NetworkFloatingLicense sample demonstrates basic network floating licensing using network semaphore files and is primarily intended for use on a local area network (LAN). The activation and license functionality is very similar to the ClientLicense sample. A NetworkFloatingLicense class is implemented in the same fashion as the ClientLicense class, with the only difference being the use of the NetworkNameIdendifierAlgorithm to bind the network license to the file server and share that hosts the network license file. Once the network license is activated and verified, each instance of the application attempts to open a network semaphore file that counts as a network seat. The NetworkSemaphore class is used to manage the network session and limits the number of concurrent users based on the QuantityOrdered set on the license record in SOLO Server. Note that the QuantityOrdered is stored in the license file and may not reflected what is set in SOLO Server until a license refresh is performed. Decrementing the value in SOLO Server will not close the open network sessions. The new user limit will be enforced once the open sessions are closed.

Design Outline

The sample application contains the same forms as the ClientLicense sample that are used for activation and displaying the license status and contains three additional forms specific to network licensing.

  1. The select license file form – This form allows entering or browsing to the location of the network license file. The form “remembers” the last license location by storing the path in a registry key. If this form is used in an application the registry key should be changed.
  2. The network seat search form – This form is displayed when the user limit has been reached based on the number of network semaphore files present. A search is performed to try to locate an orphaned semaphore file that wasn’t properly closed. This form shows a search progress bar and allows canceling the search.
  3. The invalid license countdown form – This form is displayed when the network session is no longer valid and gives the user 60 seconds to save their work and shutdown the application. A countdown timer is displayed in a top-most form so the user always sees the pending termination.