PLUSManaged: Adding Support for Volume and Downloadable Licenses

Volume licenses are very permissive licenses which are designed to be used by anyone in a given organization without requiring each user to activate.

Downloadable licenses with trigger code activation contain the same content as volume licenses, but these require trigger code validation to be authorized on each system. This serves as a way to activate systems that need to be activated without any Internet connectivity, while avoiding the limitations of the very small payload size of trigger code activation.

Implementing Support

To implement support for volume and downloadable licenses, you will need to change the way your application validates its system identifiers (especially if you want to support normal, activated licenses as well). To begin, you will need to override the License.Load method in your license implementation class so the CurrentIdentifiers are updated any time you load a new license file.

The code excerpt below shows how you can implement support for these kind of licenses into the PLUSManaged read-only license sample project.

C#
public override bool Load(string data)
{
bool result = base.Load(data);

//Initialize the identifier needed to validate the volume license.
CurrentIdentifiers.Clear();
LicenseIDIdentifierAlgorithm algorithm = new LicenseIDIdentifierAlgorithm();
CurrentIdentifiers.Add(algorithm.GetIdentifier(LicenseID)[0]);

return result;
}
VB.NET
Public Overrides Function Load(data As String) As Boolean
Dim result As Boolean = MyBase.Load(data)

'Initialize the identifier needed to validate the volume license.
CurrentIdentifiers.Clear()
Dim algorithm As New LicenseIDIdentifierAlgorithm()
CurrentIdentifiers.Add(algorithm.GetIdentifier(LicenseID)(0))

Return result
End Function

After calling the base Load method, you could conditionally run the additional code based on the product option type by evaluating the ProductOption.OptionType property, which can be a Volume License or Downloadable License with Trigger Code Validation. When using SOLO Server, the Option Type is configured in the Product Option settings.

Downloadable License File with Trigger Code Validation

Additional logic is necessary for downloadable licenses with trigger code validation, as these licenses usually involve the use of two license files: one that is essentially the same as a volume license file, and a second, writable license file that is validated like a typical, activated license file (since it is technically activated using trigger codes).

When activating the downloadable license with trigger code validation, the User Code 1 value must be set to the License ID.

The PLUSManagedGui self-signed license sample includes support for these types of licenses, and includes sample code that can be referenced and re-used for your protected applications.

Downloadable License File with Encrypted Trigger Code Validation

The concept is the same as the above Downloadable License File with Trigger Code Validation, except the Activation Code 1 and Activation Code 2 values are encrypted into a single 31-character alpha-numeric key.

You will set your Production Option type field in SOLO Server to DownloadableLicenseWithEncryptedTriggerCodeValidation.

The PLUSManagedGui self-signed license sample includes support for these types of licenses, and includes sample code that can be referenced and re-used for your protected applications. You must set the PLUManagedGui's TriggerCodesUseEncryptedKey property to true to utilize the new key.

If not using the PLUSManagedGui control, you will use the ManualActivationKey class in the PLUSManaged library to encrypt the user codes and decrypt the registration codes.