This sample doesn’t contain Manco.Licensing DLL itself in it, so don’t forget to download main archive from the 'Download - Manco .NET Licensing System' page.
The Activation Web Service is the separate part of Manco .NET Licensing System. It is designed to perform 4 main functions:
In this article we describe how the Activation Web Service can be used for online product activation.
The Activation Web Service uses licensing schema that is similar to the Windows licensing. When you install Windows you enter the License Key that is printed on the sticker. When installation is finished you follow the process of Windows activation. During this process you obtain Activation Key from the Microsoft Activation Service. After that this particular copy of the Windows can work on one PC only.
Licensing scenario with Activation Web Service can be used when you’d like to bind licensed software to particular PC. This scenario limits using of your software with one PC per one License Key/License File bought from you. This schema works as following:
Multiple activations for single license file or Unlock Key are allowed. You can specify number of the PCs where same license file or Unlock Key can be used. By default number of the activations allowed is limited by 1 PC.
We suppose that you have read section "Quick Start using Unlock Key licensing schema" already so we will describe only things are specific for the “Unlock Key with Activation” licensing schema.
Activation Web Service can automatically send e-Mail with Activation Key to user. If you’d like to use this functionality you should configure activation letter for product that uses activation schema.
Firstly we should create e-Mail configuration for Activation Letter. Select “e-Mail
Configuration” tab in the License Manager. Click
toolbar button. New e-Mail configuration will be added. Rename it (“My Product activation
e-Mail” for example). Most fields on the e-Mail configuration view are good known
for most people are using e-Mails in their practice.
Following fields are required:
When all necessary fields will be filled in click "Save all" toolbar button to save changes made.
Now select “Product” tab and select version node. In the “Activation Letter” combo box select e-Mail configuration you have created:
The “Unlock Key with Activation” license type can be defined as following:
Then you should create evaluation license file using this license type. Evaluation license file shouldn’t contain any Unlock or Activation Key (correspondent fields must be empty). Correspondent evaluation sale record could look like the following:
Pay attention that both: Unlock and Activation Keys are empty. Create license file and add it to your project.
Now you should prepare your product to use Activation Web Service.
Firstly add service reference to your project that will refer to the Activation Web Service:
Add new AwsHelper class to your project.
[C#] [Visual Basic]Add evaluation window to your project. It could looks like the following:
Add “OnClick” event handler for the “Activate” button. This handler should set Unlock Key to the license object, obtain product ID and send it to the activation server.
[C#] [Visual Basic]The evaluation window also should provide properties to get Unlock Key entered by user and Activation Key obtained from the Activation Web Service.
Next, the program needs to check to see the status of the license. If it is evaluation, or not valid, evaluation window needs to be shown that allows the user to input an Unlock Key and activate application. It looks like the best place for this code is “OnLoad” event handler:
[C#] [Visual Basic]Now you application is ready to run. First time you start it you will see evaluation window with fields to enter Unlock and Activation keys and button for product activation. If you simple close this window your application will continue execution in the evaluation mode. You can check this mode using “IsEvaluation” property of the license object. You can enable or disable some functionality or GUI controls based on this status. To get your application fully functional you have to create “Unlock Key” and then activate it.
Click
toolbar button. You will see “Add new sale” window. Enter necessary customer information.
Actually it is enough enter customer name and e-Mail, but we would recommend at
least First and Last name too. Activation Web Service can send activation e-Mail
to customer. If you’d like use this functionality then you MUST fill in “e-Mail”
field in the sale window. Click
toolbar button to perform search of the client through the database. Click
toolbar button to generate Unlock Key.
Click OK to add new sale. Save all changes made in the License Manager. To do it
click
toolbar button. All records have been created in the License Manager will be saved
in the database.
Multiple activations for single license file or Unlock Key are allowed. You can specify number of the PCs where same license file or Unlock Key can be used. By default number of the activations allowed is limited by 1 PC. You you’d like to change it set correspondent value in the “Allowed” field:
Your next step depends on if Activation Web Service uses own data service, or share data service with License Manager. In case when AWS and License Manager are using common data service you can simple use Unlock Key have been created to activate your application. If AWS and License Manager use different data services then you should synchronize data before license can be activated. See "Synchronize data with Remote Data Service" section for information how to synchronize data services.