GetTcData Class |
Implementation for calling server-side scripts which were originally designed to with with the Automation Client's SK_GetTCData and SK_GetTCDataEx functions.
Namespace: com.softwarekey.Client.Compatibility.ProtectionPLUS4
The GetTcData type exposes the following members.
Name | Description | |
---|---|---|
![]() | ActivationCode1 | Gets 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 codes using ValidateTriggerCode(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32). |
![]() | ActivationCode2 | 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 codes using ValidateTriggerCode(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32). |
![]() | AutomationClientErrorCode | Gets or sets the Automation Client error code. (Inherited from AutomationClientWebFormCall.) |
![]() | ContentEncoding | Gets or sets the encoding used for the request and response (UTF-8 is the default). (Inherited from WebFormCall.) |
![]() | ContentType | Gets or sets the content type ("application/x-www-form-urlencoded" is the default). (Inherited from WebFormCall.) |
![]() | LastException | Gets or sets the last Exception that occurred when calling the web form. (Inherited from WebFormCall.) |
![]() | LicenseID | Gets or sets the License ID (required). |
![]() | LicenseUpdate | Gets the License Update data. |
![]() | Password | Gets or sets password (required). |
![]() | ProductID | Gets or sets the Product ID. When specified, the License ID must be for the Product ID specified. |
![]() | ProductOptionID | Gets or sets the Product Option ID. When set, the License ID must be for the Product Option ID specified. |
![]() | Proxy | Gets or sets the proxy server settings. Leave as null/Nothing to use the system's default proxy settings. (Inherited from WebFormCall.) |
![]() | ProxyAuthenticationRequired | Gets or sets whether the proxy server requires authentication. (Inherited from WebFormCall.) |
![]() | RequireSsl | Gets or sets whether or not SSL is required. (Inherited from WebFormCall.) |
![]() | Response | Gets or sets the response returned from the server. (Inherited from WebFormCall.) |
![]() | StatusCode | Gets or sets the status code of the response returned from the server. (Inherited from WebFormCall.) |
![]() | Timeout | Gets or sets the timeout (in milliseconds). The default is 30000 milliseconds (or 30 seconds). (Inherited from WebFormCall.) |
![]() | UserCode1 | Gets or sets User Code 1 (required). In Protection PLUS 4, this is also referred to as the "Session Code" or "cenum".
This value can be generated using PLUS4Methods.GenerateUserCode1Value. |
![]() | UserCode2 | Gets or sets User Code 2 (required). In Protection PLUS, this is also referred to as the "Computer ID".
This value can be generated using PLUS4Methods.GenerateUserCode2Value. |
Name | Description | |
---|---|---|
![]() | CallWebForm | Calls the Automation Client web page. (Overrides AutomationClientWebFormCallCallWebForm.) |
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
![]() | TryParseValueFromResponse(String, Int32) | Tries to parse a 32 bit integer value from the Response. (Inherited from AutomationClientWebFormCall.) |
![]() | TryParseValueFromResponse(String, String) | Tries to parse a string value from the Response. (Inherited from AutomationClientWebFormCall.) |
In general, if you are using SOLO Server, you should be using License.ActivateInstallationLicenseFile or the WebServiceCall implementation for activation.
![]() |
---|
Before calling the CallWebForm method, the following properties must be set: |
Optional fields that may be populated before calling CallWebForm method include:
public bool ActivateOnline(int licenseID, string password, int userCode1, int userCode2, int productID, out int activationCode1, out int activationCode2, out string licenseUpdate) { //TODO: The URL used below is for SOLO Server Shared URL. You will need to update this URL if you are using Instant SOLO Server Dedicated URL, or SOLO Server. GetTcData activationCall = new GetTcData("https://secure.softwarekey.com/solo/unlock/getcode.asp"); activationCall.LicenseID = licenseID; activationCall.Password = password; activationCall.UserCode1 = userCode1; activationCall.UserCode2 = userCode2; activationCall.ProductID = productID; //TODO: Initialize the Proxy property here as appropriate if you need to support proxy server authentication. bool successful = activationCall.CallWebForm(); if (successful) { activationCode1 = activationCall.ActivationCode1; activationCode2 = activationCall.ActivationCode2; licenseUpdate = activationCall.LicenseUpdate; } else { activationCode1 = 0; activationCode2 = 0; licenseUpdate = ""; //TODO: Evaluate the AutomationClientErrorCode, LastException, and ProxyAuthenticationRequired properties for possible reasons why the call failed. } return successful; }