Trial for WPF and ClickOnce

We are deploying .NET WPF for beta testers using ClickOnce. We want to set an expiration date after which the application no longer opens. A fixed date or x days from the first installation is normal. After the test, we ask users of the unistall application from their computers. If they do not, we want the application to no longer open.

Specific Requirements:

  • There is no way to reset the time by reinstalling or in any other way.
  • the application should also work offline, without access to the Internet, so checking the web server every time you start the application is not the best solution.
  • subsequent updates to the application do not affect the validity period
  • we would like to extend the trial period at any time for any period by sending a new activation code or similar to the user

I look to see if there are any ready-made solutions for this (fairly common) thing, at least some basic mechanism for getting started.

+6
source share
3 answers

I used Rhino Licensing in the project (*) and it seems to cover most of your use cases. See Here for a tutorial, Rhino Code on GitHub , Direct Download of the Rhino Code (zip)

However, if someone is defined enough, then you can do nothing to stop them using your code

Rhino works by creating a license file for your users that has date-related information encoded in it. This is cryptographically signed, and the application code verifies that all is well. But all you need to win is to change your code to make a call to say whether the license was good or bad.

My solution for someone modifying my code is do it, as I will sign my code with a digital certificate that cannot be duplicated. So I can always say "Hey, here is the real code, and if your code does not match what someone did to change it?". There is a low level of fear, but you can’t do anything without standing in front of each user and forcing them to do something.

(*) I started with the base code, but then hacked the crap out of it to get what fit my desires.

+3
source

Essentially, you want to control the functions and / or lifetime of an installed application. You have described β€œ Software License Management . You are right that this is a very general business requirement, but usually any turnkey solutions will cost you money.” Managing open source software licenses will be a kind of oxymoron.

If you are developing an application environment for applications, such as Windows 8 or any mobile platform, you are usually provided with license management APIs that are tightly integrated into the application environment. But for a regular Windows Desktop application, you have to β€œpay” for a commercial solution or develop your own.

In the absence of free ready-made solutions, you can find several articles here and there , which can make you point in the right direction to implement your own solution.

0
source

you can create a hidden file, you put the first launch date of the application and set up a trial period in your code

0
source

All Articles