Click here to Skip to main content
15,908,661 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,

i'm publishing a simple application for windows,
users buy a license key and they entered in application to register it and use it.

now i want to check the users !
for instance when they open my application, it automatically connects to my web site ( or server, or anywhere else ) and check the registration key, if the key is invalid, so the application block itself !
I think some windows applications do like this, isn't it ? if you registered them with invalid keys, it'll be detected when you connect to internet and open the application !

any idea to implement this scenario !?
thanks in advance.
Posted
Comments
[no name] 26-Aug-12 13:23pm    
What if the user never connect to internet while the application is running?
I.explore.code 26-Aug-12 14:09pm    
That's exactly how older versions of Kaspersky Anti-Virus software were broken and cracked. :)
Mohamad77 26-Aug-12 13:31pm    
i don't know :( , i'll try my best in the application to detect invalid keys, but i should accept that there will be some invalid keys and invalid users !
waiting for user to connect to internet is the only chance for me !
how could i implement it !?
I.explore.code 26-Aug-12 14:13pm    
What u can do in that case, is if the users don't have a valid key or username or whatever or not connected to internet, then the application should default to trial version for "x" number of days. Because any such application that depends on external verification server needs internet connection, but you cannot take it for granted that your users will all have an internet connection or would use it to validate themselves. Some people would figure out a work around and crack your app without connecting to the internet just like Kaspersky versions were cracked.
Mohamad77 26-Aug-12 14:59pm    
thanks for answers,
you're all right !
but don't you think so that this way is better than nothing!!?
i didn't find any other idea!it was the only way I found to disable the cracked apps !!

Meysam Tolouee is completely right! "What if the user never connect to internet while the application is running?"
Your logic is: i can use application until i have connection to the internet.

So, the answer is not so simple as it should be...

In my opinion, user can't install application until the registation key is wrong! You can check the registration key in the installation proccess. You can register the number of copies, computer IP and any other data. If the installation proccess was successfuly completed, user can use it as long as the license key is valid to.
 
Share this answer
 
Hello,

There are no fool proof solutions..., even Microsoft can't protect Windows or Office 100% but anyway there are a few basic ways to protect your application.

A solution is to use a license file and the LicenseManager class.
Another way is to use the registry.

These two methods are fairly robust and simple and should be enough to protect your application against standard users.

Here is a good article describing step by step implementation:
http://www.codeguru.com/csharp/.net/net_framework/licensing/article.php/c5469/Licensed-Applications-using-the-NET-Framework.htm[^]

Alternatively you can also look at some articles that were published on codeproject in the past and provide some interesting implementations:
Application Trial Maker[^]
Software Copy Protection for .Net Applications - a Tutorial[^]
A Secure Software Distributon SDK[^]

Valery.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900