We're deploying .NET WPF app to beta-testers using ClickOnce. We want to set a expiration date after which the app doesn't open anymore. Fixed date or x days from the first installation are both ok. After the trial we ask the users to unistall the app from their computers. In case they don't do so, we want that the app doesn't open anymore.
Specific requirements:
I'm looking if there is some readymade solutions out for this (pretty common) thing, at least some basic mechanism to start working on.
I have used Rhino Licensing in a project(*) and it seems to cover most of your use cases. See Here for a tutorial, Rhino code on GitHub, Rhino code direct download (zip)
However if someone is determined enough then there is nothing you can do to stop them using your code
Rhino works by you generating a license file for your users that has date related information encoded in it. This is cryptographically signed and the app code validates it is all good. But all it needs to be defeated is to modify your code to take out the call to say if the license was good or bad.
My solution to someone modifying my code is "go ahead do it", as I will be signing my code with a digital certificate which can't be duplicated. So I can always say "Hey, here is the real code and if your code doesn't match then what has someone done to modify it?". Low level fear stuff, but there is nothing you can do short of standing over each user personally and making them do stuff.
(*) I did start with the base code but then hacked the crap out of it to get something that matched my desires.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With