To enable activations, you just need to have the LicenseSpot framework installed. We always recommend that you implement activations in your application. To do so, just use the Activation() method on the framework.
The first step before implementing activations is to get your public key. This key is already configured in your LicenseSpot and was created when you signed up. This key will help with the validation of the license and we check that your customer hasn’t tampered the license in any way.
To get the public key, to the key pair screen in LicenseSpot, click on the default public key created and copy it into the clipboard:
To activate your application, you need to send to LicenseSpot the serial number the customer is using to activate the app. This serial number was sent to the customer when they bought your product or requested to download a trial.
To activate your app, you can use the Activate() method in the framework:
C#
ExtendedLicense license = ExtendedLicenseManager.GetLicense(typeof(Form1), this, "you public key");license.Activate("serial number");
VB.NET
Dim license as ExtendedLicenselicense = ExtendedLicenseManager.GetLicense(Me.GetType(), Me, "your public key")license.Activate("serial number")
What this method does is that it’ll contact the LicenseSpot servers and will check if the serial number exists in the system. If it does, it’ll check that the serial number supports activations, it’ll then check that it has activations left and if it does, it’ll add an activation to the serial number.
The framework will then receive the response from LicenseSpot which is basically the contents of the license and it’ll save a copy of the file locally in c:\ProgramData\IPManager. The license will have a .lic extension.
To validate that the activation is active and that the local license hasn’t been tampered by the customer, you’ll use the IsGenuineEx() method of the framework.
C#
GenuineResult result = license.IsGenuineEx();
VB.NET
Dim result as GenuineResult = license.IsGenuineEx()
This method will check the local license file that it’s still valid and that the customer didn’t try to change it. Then it’ll try to connect to the LicenseSpot server to check that the activation hasn’t been deactivated or that the license isn’t in a revoke status. The method will return one of the following three values:
Morbi quam odio, ultrices a libero sit amet, lacinia commodo quam. Curabitur sodales ornare ex, eu sodales elit venenatis non.
Morbi quam odio, ultrices a libero sit amet, lacinia commodo quam. Curabitur sodales ornare ex, eu sodales elit venenatis non.
Morbi quam odio, ultrices a libero sit amet, lacinia commodo quam. Curabitur sodales ornare ex, eu sodales elit venenatis non.
Morbi quam odio, ultrices a libero sit amet, lacinia commodo quam. Curabitur sodales ornare ex, eu sodales elit venenatis non.
Morbi quam odio, ultrices a libero sit amet, lacinia commodo quam. Curabitur sodales ornare ex, eu sodales elit venenatis non.
Morbi quam odio, ultrices a libero sit amet, lacinia commodo quam. Curabitur sodales ornare ex, eu sodales elit venenatis non.