Open topic with navigation
ClientLicense Sample
Overview
The ClientLicense sample application is designed to showcase basic online activation and usage of encrypted and signed XML License Files and web service calls while only using the most secure features of PLUSManaged where licenses are authorized and digitally signed by SOLO Server.
Design Outline
- Licensing logic is implemented in the ClientLicense class, which inherits the PLUSManaged library's License class. The ClientLicense class includes data specific to this application and its author, and methods specific to the licensing needs of this application.
- This class contains 1 simple constructor that takes in a path to a license file since this sample revolves around this. This then calls the License class's constructor passing in data specific to this particular application, and initializes data for uniquely identifying the system on which the application is run.
- It also implements its own license validation in the IsValid property. Here, depending on the type of license, it may perform various combinations of checks to determine whether or not the license should be considered valid on the system on which it is run.
- Three forms are used, none of which perform licensing functions directly, as this is all abstracted out in the ClientLicense class and the PLUSManaged library's License class. However, they provide the means to display licensing information and perform common licensing functions.
- The main form - This form has a number of buttons on it, and a label for displaying the status of the license. The form contains 2 methods (ReloadLicense and RefreshLicenseStatus) for updating the controls on the form when the license is updated and/or re-evaluated.
- The online activation form - This form allows a license to be activated online through web service calls, and is the simplest way a user may activate his or her license.
- The manual activation form - This form allows manual activation to be done when web services are unreachable. This does, however, require the user to send data through some alternative form of transmission, such as sending an email or using a web page. This can be useful in situations where application/personal firewalls block the web service calls, for example.