GetRegData Class |
Implementation for calling server-side scripts which were originally designed to with with the Automation Client's SK_GetRegData and SK_GetRegDataEx functions.
Namespace: com.softwarekey.Client.Compatibility.ProtectionPLUS4
The GetRegData type exposes the following members.
Name | Description | |
---|---|---|
![]() | GetRegData | Creates a new GetRegData object. |
Name | Description | |
---|---|---|
![]() | AutomationClientErrorCode | Gets or sets the Automation Client error code. (Inherited from AutomationClientWebFormCall.) |
![]() | CompanyName | Gets the customer's company name. |
![]() | ContactName | Gets the customer's name. |
![]() | 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.) |
![]() | Gets the customer's email address. | |
![]() | 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). |
![]() | Password | Gets or sets password (required). |
![]() | Phone | Gets the customer's phone number. |
![]() | 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.) |
![]() | UserDefinedString1 | Gets the User Defined String 1 value, which often contains the customer's street address (or line 1 of the customer's address). |
![]() | UserDefinedString2 | Gets the User Defined String 2 value, which often contains the customer's second address line (i.e. apartment or suite number). |
![]() | UserDefinedString3 | Gets the User Defined String 3 value, which often contains the customer's third address line (usually including City, State/Province, and Zip/Postal Code). |
![]() | UserDefinedString4 | Gets the User Defined String 4 value, which often contains the country of the customer's address. |
![]() | UserDefinedString5 | Gets the User Defined String 5 value, which often contains the customer's fax number. |
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, all of the information provided by this script is included with the license files returned by SOLO Server when using License.ActivateInstallationLicenseFile or the WebServiceCall implementation for activation. Additionally, InfoCheck may be used to retrieve registration data from SOLO Server as well.
![]() |
---|
Before calling the CallWebForm method, the following properties must be set: |
public bool RetrieveRegistrationData(int licenseID, string password, out string companyName, out string contactName, out string email) { //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. GetRegData registrationCall = new GetRegData("https://secure.softwarekey.com/solo/customers/getregdata.asp"); registrationCall.LicenseID = licenseID; registrationCall.Password = password; //TODO: Initialize the Proxy property here as appropriate if you need to support proxy server authentication. bool successful = registrationCall.CallWebForm(); if (successful) { companyName = registrationCall.CompanyName; contactName = registrationCall.ContactName; email = registrationCall.Email; } else { companyName = ""; contactName = ""; email = ""; //TODO: Evaluate the AutomationClientErrorCode, LastException, and ProxyAuthenticationRequired properties for possible reasons why the call failed. } //TODO: This sample function's prototype only supports a subset of values returned by a GetRegData call. You may add additional parameters and update the function as needed. return successful; }