Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best ways to solve Date time license issue [closed]

Tags:

c#

licensing

Right now we are developing a small Windows-based application. We used to provide trial version license for a period of 30 days and after the expiration of 30 days, the product would be unusable.

Now here's my problem:

Imagine a client who downloaded and installed the application on Jan 1 and by Feb 1, the trial period would end. Now on Jan 31, if he changes the system time to Jan 1 again, the system starts to count from beginning, so the client can extend the trial period by simply changing the system time.

And as per community suggestions, we can check the internet/date time, but as a small concern, we can't randomly validate license through a server and if the user goes offline and changes his system date time, then there will be a problem again. Are there any other ways to tackle this problem?

I have already checked this question.

What are the best ways to tackle this problem? The product is a C# application.

like image 436
irror Avatar asked Mar 26 '13 07:03

irror


2 Answers

As per your requirement, what I see, you cannot check the online server for date. This is quite obvious for offline system.

So, you need to do few things -

  1. set the registration date and expirydate in the form of high encypted data and save it somewhere in registry database.

  2. While the Application opens each time, get the latest clock date and save the encrypted data in registry.

  3. Ensure to check the Clock date and the Last Usage Date. If last usagedate < clockdate, then everything fine but if usagedate>clockdate, user has changed the clock date. So, don't update the registry.

  4. Once the lastusagedate reaches the expiry date, pops a message "Your Trial has been expired.".

Hope this helps.

cheers

like image 180
Sandip.Nascar Avatar answered Oct 08 '22 07:10

Sandip.Nascar


Probably the best possible solution would be to have an online server for verification of the licensing details. If you let your application be dependant over client machine's data then there is always a chance that they will break it. But for that your client must have internet access

like image 29
Habib Avatar answered Oct 08 '22 06:10

Habib