Background
If you want to support manual activation (see Manually Activate a License) in your Activation Dialog you need to provide the following functionality as per the sample Manual Activation Dialog below:
- Capture the Activation key, validate the key and create a Manual Activation request.
- Display the Activation Request string in a Textbox.
- Save the request as a text file (and optionally allow it to be copied to the clipboard).
- Navigate to the received license file and then install the license.
Once the Activation Request has been copied the customer must submit this to the Software Potential service for processing. This is done by uploading the request text file to the Software Potential Manual Activation site at http://manualactivation.softwarepotential.com and then download license file on successful activation.
Alternatively, you could create your own branded web page to allow customers to both submit manual Activation Requests and retrieve license files.
Implementation Steps
Step 1: Generating Manual Activation Request
To create a manual Activation request you will need to
- Capture the Activation Key.
- Generate the Manual Activation request as a string (see code below).
- Store the request string to a text file that can be uploaded to the Software Potential service for processing. It is recommended to use the 5x5 Activation Key as the file name.
Sample code:
string requestString = SpAgent.Product.Activation.Advanced().CreateManualActivationRequest(activationKey, null);
Step 2: Submitting Manual Activation Requests to SP Activation Service.
There are two options for request submission and and retrieval of the resulting license file on successful activation:
- Process the request using the page in the Software Potential Manual Activation site at http://manualactivation.softwarepotential.com and download the resultant license file on successful activation.
- Provide your own branded public web page where a customer can submit a Manual Activation request directly and then download the resultant license file on successful activation. Removing the need for your manual intervention simplifies and shortens the Manual Activation process
You can find a sample MVC application for such a web page on our GitHub account Manual Activation Sample (uses Sp.Agent Nuget).
Step 3: Install the license file on the machine that originated the activation request.
To install the retrieved license file, in your application you will need:
- A UI to load/store the license file and
- A mechanism to extract and store the license in the license store.
Sample code:
//Read the license file into byte[] var licenseBlob = File.ReadAllBytes(@"U:\file.bin "); //Install the license file "file.bin" SpAgent.Product.Stores.Install(licenseBlob);
License File Locking
If the license is Machine Locked the license (.bin) file returned on successful activation can only be used on the machine on which the activation request was generated.
If the license is not Machine Locked the license file resulting from manual activation can be installed on an unlimited number of machines.
Comments
0 comments
Article is closed for comments.