Activation Locking
It is now possible to add one or more Custom Tags to a license at time of issue, that will constrain activations of that license. At each activation the value of the tags will be compared with the value of the corresponding Activation Tags included in an Activation Request and if the values match the activation will succeed; otherwise the activation will fail.
Please see Control License Activation article for more details.
For this to work you must add the required Custom Tags to the Activation Request generated by the runtime. This can only be done programmatically. In the case of the older SLP runtime, it is not possible to do this using the default Activation Wizard so you will need to generate a custom Activation dialog.
Activation Request & Custom Tags
In the case of the legacy SLP runtime, Custom Tags are added to the Activation Request programmatically using the ILicenseRequestBuilder class in the runtime API. Once the CustomTags are added you will then need to submit the request to the Software Potential Activation Service endpoint.
The following code snippet shows how to add a single Custom Tag to an Activation Reqeust:
private static byte[] CreateActivationRequestBlob(string activationKey) { if (!ValidateActivationKey(activationKey)) { Console.WriteLine("Invalid Activation Key"); return null; } ILicenseRequestBuilder licenseRequestBuilder = _slmRuntime.Activation.GetLicenseRequestBuilder(activationKey); licenseRequestBuilder.AddAvailableLicenseStores(); //Add Custom Tags to the activation request. //Once activated, Custom Tags are included in the license created on activation. licenseRequestBuilder.AddCustomTag("TagName", "TagValue"); return licenseRequestBuilder.CreateRequest().GetAsByteArray(); }
Comments
0 comments
Article is closed for comments.