Click or drag to resize
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.

Inheritance Hierarchy

Namespace: com.softwarekey.Client.Compatibility.ProtectionPLUS4
Assembly: PLUSManaged (in PLUSManaged.dll) Version: 5.23.4.0
Syntax
public class GetRegData : AutomationClientWebFormCall

The GetRegData type exposes the following members.

Constructors
  NameDescription
Public methodGetRegData
Creates a new GetRegData object.
Top
Properties
  NameDescription
Public propertyAutomationClientErrorCode
Gets or sets the Automation Client error code.
(Inherited from AutomationClientWebFormCall.)
Public propertyCompanyName
Gets the customer's company name.
Public propertyContactName
Gets the customer's name.
Public propertyContentEncoding
Gets or sets the encoding used for the request and response (UTF-8 is the default).
(Inherited from WebFormCall.)
Public propertyContentType
Gets or sets the content type ("application/x-www-form-urlencoded" is the default).
(Inherited from WebFormCall.)
Public propertyEmail
Gets the customer's email address.
Public propertyLastException
Gets or sets the last Exception that occurred when calling the web form.
(Inherited from WebFormCall.)
Public propertyLicenseID
Gets or sets the License ID (required).
Public propertyPassword
Gets or sets password (required).
Public propertyPhone
Gets the customer's phone number.
Public propertyProxy
Gets or sets the proxy server settings. Leave as null/Nothing to use the system's default proxy settings.
(Inherited from WebFormCall.)
Public propertyProxyAuthenticationRequired
Gets or sets whether the proxy server requires authentication.
(Inherited from WebFormCall.)
Public propertyRequireSsl
Gets or sets whether or not SSL is required.
(Inherited from WebFormCall.)
Public propertyResponse
Gets or sets the response returned from the server.
(Inherited from WebFormCall.)
Public propertyStatusCode
Gets or sets the status code of the response returned from the server.
(Inherited from WebFormCall.)
Public propertyTimeout
Gets or sets the timeout (in milliseconds). The default is 30000 milliseconds (or 30 seconds).
(Inherited from WebFormCall.)
Public propertyUserDefinedString1
Gets the User Defined String 1 value, which often contains the customer's street address (or line 1 of the customer's address).
Public propertyUserDefinedString2
Gets the User Defined String 2 value, which often contains the customer's second address line (i.e. apartment or suite number).
Public propertyUserDefinedString3
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).
Public propertyUserDefinedString4
Gets the User Defined String 4 value, which often contains the country of the customer's address.
Public propertyUserDefinedString5
Gets the User Defined String 5 value, which often contains the customer's fax number.
Top
Methods
  NameDescription
Public methodCallWebForm
Calls the Automation Client web page.
(Overrides AutomationClientWebFormCallCallWebForm.)
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 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 methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodTryParseValueFromResponse(String, Int32)
Tries to parse a 32 bit integer value from the Response.
(Inherited from AutomationClientWebFormCall.)
Public methodTryParseValueFromResponse(String, String)
Tries to parse a string value from the Response.
(Inherited from AutomationClientWebFormCall.)
Top
Remarks

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.

Note Note

Before calling the CallWebForm method, the following properties must be set:

Examples
This example shows how to make a typical call:
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;
}
See Also