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:
E-Mail template is presented as XSLT description. To send e-Mail you should load XSLT description from the file. Click button and select XSLT file to load. See Appendix A for structure of XML data passed to the XSLT for transformation.
When all necessary fields will be filled in click toolbar button to save changes made.
Now select “Products” tab, expand product tile, and select version tile. Switch to the “Letters” tab. Click toolbar button. In the “Event” column select “LicenseActivated”. In the “e-Mail Config” column select configuration you’ve 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.
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. In this example we use Task Framework for asynchronous AWS call.[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.[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.
In the License Manager go to the “License types” tab and click the “Mange sales” button:
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. Click toolbar button to perform search of the client through the database:
Switch to the “Sale” tab and click toolbar button to generate Unlock Key.
Click OK to add new sale.
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.