- Checks if the time on the client system is synchronized with the License Server.
- Calls IsLicenseKeyRevokedEx to check if the license was revoked in which case the Activation Key and Computer Key are automatically deleted from the local system.
- Calls IsIllegalComputer to check whether the ActivationKey and ComputerKey are registered in the database. If the computer is detected as an illegal computer, the Activation Key and Computer Key are automatically deleted from the local system.
- If the server reports that the license has expired, the Computer Key stored on the local system is deleted.
- Publishes Analytics to the server if PublishAnalytics is set to true.
- Records the last time connection to the server was made in order to enforce the MaxDaysOffline setting.
- Verifies whether the system has exceeded the MaxDaysOffline setting.
- Returns whether the server has more up-to-date values for the SubscriptionExpiryDate, Features, and FloatingSeats.
To use a proxy server, you must set the UseProxyServer, ProxyUser, ProxyDomain, and ProxyPassword properties prior to calling this function.
C#: ILicenseInfo ValidateLicenseOnServerEx3 (string webServiceUrl, string activationKey, string computerKey, string computerID, string computerName, bool autoReactivate, out EServerErrorCode errorCode, out string returnMsg, out bool result)
Return
This function returns an ILicenseInfo object that contains license information retrieved from the server. If the result argument returns false, the validation has failed. errorCode and returnMsg provide additional details as to the failure.
Parameters
webServiceUrl - URL to the QLM License Server.
activationKey - the license key to activate
computerKey - the computer bound key
computerID - the unique computer identifier
computerName - the name of the computer. If you pass an empty string, QLM will automatically extract the computer name of the current system.
autoReactivate - when true, if the license is not activated on the server, it will be automatically reactivated if licenses are still available.
errorCode - returned error code
returnMsg - returned error message
result - true if the validation was successful, false otherwise.
Example:
LicenseValidator lv = new LicenseValidator (settingsFile);
bool result;
string serverMessage = string.Empty;
EServerErrorCode errorCode;
ILicenseInfo li = lv.QlmLicenseObject.ValidateLicenseOnServerEx3(string.Empty, activationKey, computerKey, computerID, Environment.MachineName, false, out errorCode, out serverMessage, out result);
if (result == true)
{
bool reactivate = (li.NewExpiryDate != DateTime.MinValue) || !String.IsNullOrEmpty(li.NewFeatures) || (li.NewFloatingSeats != -1);
if (reactivate)
{
// Reactivate the key
}
}
else
{
// Display returnMsg
}
Comments
0 comments
Article is closed for comments.