Click or drag to resize
ActivateInstallation Class
Implements the XmlActivationService web service's ActivateInstallation method, which activates and retrieves an Installation ID.
Inheritance Hierarchy
SystemObject
  com.softwarekey.Client.WebServiceWebServiceCall
    com.softwarekey.Client.WebService.XmlActivationServiceActivateInstallation

Namespace: com.softwarekey.Client.WebService.XmlActivationService
Assembly: PLUSManaged (in PLUSManaged.dll) Version: 5.23.4.0
Syntax
public class ActivateInstallation : WebServiceCall

The ActivateInstallation type exposes the following members.

Constructors
  NameDescription
Public methodActivateInstallation(AuthorEncryptionKey)
Creates a new ActivateInstallation object.
Public methodActivateInstallation(XmlActivationService, AuthorEncryptionKey)
Creates a new ActivateInstallation object.
Top
Properties
  NameDescription
Public propertyActivationData
Gets or sets the Activation Data document, which contains the SystemIdentifier information. This field is optional, but recommended. This document may be generated using the SystemIdentifier.GenerateActivationDataXml method.
Public propertyClassName
Gets or sets the class name of the WebServiceClient object.
(Inherited from WebServiceCall.)
Public propertyEncryptionKey
Gets or sets the author encryption key data.
(Inherited from WebServiceCall.)
Public propertyErrorMessage
Gets or sets the error message returned by the web service method call. (See http://www.softwarekey.com/go/?ID=20 for a list of possible values.)
(Inherited from WebServiceCall.)
Public propertyInstallationID
Gets or sets the Installation ID, which is a unique identifier for the given activation which was issued. If you specify the Installation ID of a prior activation, SOLO Server will show that the specified Installation ID is related to the new Installation ID (if issued).
Public propertyInstallationName
Gets or sets the Installation Name, which may be a name of your choice or the user's choice. You may opt to use things like a username or computer name here, or you may also allow the user to specify a friendly name.
Public propertyLastError
Gets or sets the last error which occurred.
(Inherited from WebServiceCall.)
Public propertyLicenseID
Gets or sets the License ID, which is required for License ID and Password validation.
Public propertyMethodName
Gets or sets the name of the method which will be called from the WebServiceClient object.
(Inherited from WebServiceCall.)
Public propertyPassword
Gets or sets password, which is required for License ID and Password validation.
Public propertyProdOptionID
Gets or sets the Product Option ID. When the value is non-zero, the Product Option ID in SOLO Server will be validated against the product for which the License ID was issued.
Public propertyProductID
Gets or sets the Product ID. When the value is non-zero, the Product ID in SOLO Server will be validated against the product for which the License ID was issued. This is only required when using serial number and Product ID validation.
Public propertyProductVersion
Gets or sets the product version number, which is optional. When set, this must be formatted like NNNNN.NNNNN.NNNNN.NNNNN format, where N represents a digit.
Public propertyProductVersionNumber
Gets or sets the product version number, which is optional. This corresponds with the ProductVersion property, but uses the System.Version class to create the ProductVersion string.
Public propertyRegistrationKey1
Gets or sets Activation Code 1. This is also known as "RegKey1" in Protection PLUS 4, and will be populated with a Protection PLUS 4 compatible activation code (or "Trigger Code") after processing the response successfully.
Public propertyRegistrationKey2
Gets or sets Activation Code 2. This is also known as "RegKey2" in Protection PLUS 4, and may be populated with a Protection PLUS 4 compatible activation code (or "Trigger Code") after processing the response successfully.
Public propertyRequireRegistration
Gets or sets whether or not customer registration is required for activation. Customer registration is where the customer enters information (such as name, email, address, etc...) about himself or herself with SOLO Server.
Public propertyRequireSsl
Gets or sets whether or not SSL certificate validation to check.
(Inherited from WebServiceCall.)
Public propertyResultCode
Gets or sets the result code returned by the web service method call. (See http://www.softwarekey.com/go/?ID=20 for a list of possible values.)
(Inherited from WebServiceCall.)
Public propertySerialNumber
Gets or sets the serial number. This is only required when using serial number and Product ID validation.
Public propertySessionCode
Gets or sets the randomized session code (used to deter replay attacks).
(Inherited from WebServiceCall.)
Public propertySessionCodeValidation
Gets or sets whether or not session code validation should be done automatically.
(Inherited from WebServiceCall.)
Public propertyUseDigitalSignature
Gets or sets whether or not a digital signature is to be used or is required for the web service call. (This can only be set to false if UseEncryption is already set to false.)
(Inherited from WebServiceCall.)
Public propertyUseEncryption
Gets or sets whether or not encryption is to be used or is required for the web service call.
(Inherited from WebServiceCall.)
Public propertyUserCode1
Gets or sets User Code 1. Although the web service requires a non-zero value in this field, this property is only relevant if you are using Protection PLUS 4 (where it is also referred to as the "Session Code") "Trigger Code" compatibility features. (The default value will suffice if you are not using these features.)
Public propertyUserCode2
Gets or sets User Code 2. Although the web service requires a non-zero value in this field, this property is only relevant if you are using Protection PLUS 4 (where it is also referred to as the "Computer ID") "Trigger Code" compatibility features. (The default value will suffice if you are not using these features.)
Public propertyWebServiceClient
Gets or sets the SoapHttpClientProtocol object (.NET Framework) or the XmlWebService object (.NET Standard 2.0) used to perform the web service method call.
(Inherited from WebServiceCall.)
Public propertyWebServiceResponse
Gets or set the XmlNode object reference for the root XML node of the web service response.
(Inherited from WebServiceCall.)
Top
Methods
  NameDescription
Protected methodAppendSessionCode(String)
Appends the SessionCode value to an XML request string depending on the SessionCodeValidation setting, and returns the updated XML string
(Inherited from WebServiceCall.)
Protected methodAppendSessionCode(XmlDocument)
Appends the SessionCode value to an XmlDocument depending on the SessionCodeValidation setting, and returns the updated XML string
(Inherited from WebServiceCall.)
Public methodCallWebService
Calls the web service method.
(Inherited from WebServiceCall.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGenerateEncryptedRequest
Generates an encrypted web service call XML request string.
(Inherited from WebServiceCall.)
Public methodGeneratePlainTextRequest
Generates a plain-text XML request string for ActivateInstallation calls.
(Overrides WebServiceCallGeneratePlainTextRequest.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodProcessResponse(String)
Processes a web service response XML string.
(Inherited from WebServiceCall.)
Public methodProcessResponse(XmlNode)
Processes a web service response.
(Overrides WebServiceCallProcessResponse(XmlNode).)
Public methodResetSessionCode
Sets the SessionCode value to a new, randomized value.
(Inherited from WebServiceCall.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodValidateWebServiceResponseFormat
Verifies the format of the response received is such that expected and required content can be found and parsed.
(Inherited from WebServiceCall.)
Top
Remarks

The XmlActivationService documentation should be referenced for the most current information.

Caution note Caution

If you wish to call these web services for PLUSManaged License implementations, we recommend you use the License.ActivateOnline method, which implements this call for you.

Caution note Caution

Any Product Options in SOLO Server which you intend to use when issuing License IDs which will be activated with this method must have the "Issue Installation ID" option enabled. Please refer to the SOLO Server manual for details.

Note Note

Before calling the CallWebService method, some properties must be set:

Note Note

Properties strongly recommended to have set before calling the CallWebService method include:

  • ActivationData, which includes the system identification data. This can be generated via the SystemIdentifier.GenerateActivationDataXml method.
  • ProductID, which having set as valid (non-zero) Product ID will result in SOLO Server validating that the License ID being activated is for the specified Product ID. This is an important mechanism for preventing someone from activating the wrong product (or activated "Product A" with a license for "Product B", for example).
  • InstallationName, which may be used to specify a friendly name for the Installation ID issued during activation. This could include a user-specified name, or a name of your choosing (such as the computer name or username).
  • ProductVersion, which you may use to identify which version of your product is being activated. This can be very helpful for support and troubleshooting purposes.
Examples
This example shows how to make a typical activation call for a PLUSManaged license:
public bool Activate(AuthorEncryptionKey encryptionKey,
    Int32 licenseId, string password, Int32 productID,
    string installationName, List<SystemIdentifier> currentIdentifiers,
    ref LicenseError lastError)
{
    ActivateInstallation ws = new ActivateInstallation(encryptionKey);
    ws.LicenseID = licenseId;
    ws.Password = password;
    ws.ProductID = productID;
    ws.ProductVersionNumber = System.Reflection.Assembly.GetCallingAssembly().GetName().Version;
    ws.InstallationName = installationName;
    if (currentIdentifiers.Count > 0)
        ws.ActivationData = SystemIdentifier.GenerateActivationDataXml(currentIdentifiers);

    XmlActivationService client = new XmlActivationService();
    // If you are using SOLO Server Dedicated URL or a self-hosted instance of SOLO Server,
    // set the client.Url property here.  You may also configure proxy settings on this object here, if necessary.
    ws.WebServiceClient = client;

    if (!ws.CallWebService())
    {
        lastError = ws.LastError;
        return false;
    }

    //TODO: Store the new Installation ID from the value in the ws.InstallationID property

    return true;
}
See Also