A demo client application (WPF) for SLASCONE software licensing, which uses the official NuGet package. Its main purpose is to demonstrate how you can enable online and/or offline licensing (at the same time), while providing a rudimentary/explanatory UI. Although this is a desktop application, the same principles apply for other application types as well. Both named and floating licenses can be used.
Depending on your application you might need:
- both online and offline mode (most desktop applications)
- online mode only (application servers/backends)
- offline mode only (any application type with no connectivity)
The application connects to the SLASCONE official demo environment. In order to connect to your SLASCONE environment, adjust the values of the file LicensingService.cs
.
Online is the recommended licensing mode, since it unleashes the full functionality of SLASCONE.
The online activation is a very straightforward process, requiring a license key.
After a successful activation, the application sends a periodic heartbeat (license check) to ensure that the license parameters are up to date.
A heartbeat might fail due to primarily two reasons:
- No connectivity
- The license is not valid anymore (e.g., deactivated, expired).
If a heartbeat fails, you normally do not want to restrict software access immediately. Instead, you typically want to notify the user and ensure that the problem can be remedied (e.g., by going online), within a reasonable amount of time.
Freeride comes into play for such scenarios. In this example freeride is set to 7 days, but the value can be changed in the SLASCONE web portal.
The licensing lifecycle for a device ends with its unassigning/deactivation. It is recommended to provide an area in your software, in which the end user can unassign the used license code, so that this can be used on another device (typical hardware migration scenario).
Please refer to this article, in order to find more information about permanently offline scenarios.
Activation in offline scenarios is a 2-step process requiring two license (xml) files:
- the license file
- the activation file
After uploading the license file, an activation file has to be generated and uploaded too. Since the client is offline this generation has to be done on a proxy device using:
- the generated link
- or the QR code
By uploading the activation file, the activation is complete.
This application automatically recognizes the provisioning mode of the inserted license (named or floating). In case of a floating license, the application opens a session as described here.