I have a C# program that I would like to sell and I want to offer a 14 day trial, I understand that all piracy prevention schemes are overcome so I don't want to waste much time doing this. Could anyone offer any suggestion and even some sample code?
Thanks
A thief can always turn back the clock to within 14 days of the install, as well as virtualization to achieve the same end. Can you count on net access and have the program phone home for a key?
HASP is one company that does this full time.
Also, depending on factors such as the size of your target market, your purchase price, your competition, and the ecosystem you're selling to, you might consider that some amount of priracy might be your best marketing tool. Which is the greater risk: that your software is widely pirated, or that your software is lost in the noise and few ever even try it? Some software allegedly owes it success to wide spread piracy (WordStar, dBase, Lotus 1-2-3, iirc). A quick google shows that Chapter 13 of "in search of stupidity" touches on this.
It's a tough question, good luck.
Honestly since you are using C# i'd say don't waste time on licensing. If someone wants your program without paying, they will simply open it up with any IL reader and remove your licensing system or just nop it.
As another user said make a free version with limited functinality. Sell the full version hope it's not spreaded too fast on torrent sites.
Or simply remake your application in another language e.g. c++ and use a licensing system that has to connect to a server. Making it slightly harder to reverse engineer.
Just take notice that whenever your program becomes somewhat popular it will be hacked/cracked.
Simply rely on the honest people or people who use it commercialy and cannot afford to "get caught" using illegal software.
EDIT* Someone said to use .NET Reactor over at www.eziriz.com If it works as advertised this will only stop people to easily read your code. It won't stop people to reverse engineer it and hack it anyway. The question is how much do you want to pay for protection? (This is basically rewriting it in another programming language only you pay for it. (less time consuming though), again does it work as advertised?)
Only save way of doing this would insult an online registration of the software, to one of you servers. The software should generate an id on install with fixed system ids used, so the server may identify the software on that system.
Well, I would recommend not to build a trial version, but a free version with limited functionality.