One Time Online Activation

Comments

8 comments

  • Official comment
    Avatar
    Soraco Technologies

    Hi Nicholas

    This is the default behavior of QLM. Once you activate, QLM no longer needs to connect to the License Server. QLM stores information on the local system and uses this information subsequently to ensure that the license is valid.

    You could add some code to ping the license server occasionally and check that the license has not been revoked, but the default behavior does not connect to the server at all after initial activation.

     

    Regards

    John

    Comment actions Permalink
  • Avatar
    Nicholas Baumgärtner

    Thanks for the fast reply.

    Only to be clear. ActivateLicense calls the server, but ValidateLicenseEx doesn't?

    And could you also help me with the other question. Because if the license couldn't be activated I would need some information on why not.

    0
    Comment actions Permalink
  • Avatar
    Soraco Technologies

    Hi Nicholas

     

    Correct, ActivateLicense calls the server but ValidateLicenseEx does not. In general, any method that takes as a first argument the URL to the server calls the server. Any method that does not have the URL to the server as a the first argument does not call the server.

    I'm not what your other question is. Could you elaborate please?

     

    John

    0
    Comment actions Permalink
  • Avatar
    Nicholas Baumgärtner

    Sure, but this is probably redundant. :-)

    Lets say somebody installs my application, then the Validate function gets called and obviously fails. So it gets an Activation Key (from the user) and then calls ActivateLicense. Nothing special till this point.

    But if ActivateLicense fails now, I need to know for what reason it failed. As far as I can see the only information I can get about the reason is the response string.

    First question is aren't there any error codes?

    As far as I can see there aren't any, so I would need a list of the possible response strings.

    The reason for this is just, that if the ActivateLicense fails because of invalid or already in use ActivationKey I would reject the user from using the application. But if the reason is proxy related or unreachable server I would allow the user to use the software and check later again hoping the server got reachable.

    0
    Comment actions Permalink
  • Avatar
    Soraco Technologies

    Hi Nicholas

    The response that you get back from the server will contain more details about the reason of the failure. To parse the response, use the code below.

    // assuming you called ActivateLicense and you got a response back

    ILicenseInfo li = new LicenseInfo ();
    string message = string.Empty;

    if (license.ParseResults (response, ref li, ref message))
    {


    }

    else

    {

    // you will end up here if there's an error. The "message" provides details about the reason for failure

    }

    0
    Comment actions Permalink
  • Avatar
    Nicholas Baumgärtner

    Yes but the problem is I want to write code which reacts differently depending on the kind of error. So I need to know what messages could come when I'm writing my code.

    If there are error codes I could do this for example:

    Codes:

    1 = No connection

    2 = Invalid Activation Key

    3 = Server Timeout

    ...

     

    and then I would write code like

     

    if (errorCode == 1)

             // do this

    else if (errrodCode == 2)

            // do something different

     

    Now as far as I can see there are no error codes. So I need a different approach. Maybe you could give me a list of all the possible error messages. Something like

    " Couldn't connect to the server. "

    " The activation key was invalid. "

    " The server timed out after xxx seconds. "

     

    Then I could write code like

     

    if (errorMessage == " Couldn't connect to the server. ")

             // do this

    else if (errorMessage == " The activation key was invalid. ")

            // do something different

     

     

    Thanks in advance

    0
    Comment actions Permalink
  • Avatar
    Soraco Technologies

    I understand. Unfortunately, there are currently no error codes. This is on our roadmap but no time frame has been set yet.

     

    John

    0
    Comment actions Permalink
  • Avatar
    Nicholas Baumgärtner

    And you probably can't give me a collection of the string messages?

    0
    Comment actions Permalink

Please sign in to leave a comment.