Solved

How to protect the application with a serial-number?

Posted on 2012-03-24
2
369 Views
Last Modified: 2012-03-25
Dear Experts,

I use VS2010 and I programm in C#.

My application is almost ready. Only I miss 1 important thing in my application.
When I download and install other applications that is not freeware, it always
asks for a serialnumber, when I enter a valid number the application becomes
available. In other words, how can I protect my application with a serial-number?
And are there other ways to protect my application.

Greetings,


Peter Kiers
0
Comment
Question by:peterkiers
2 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 37761128
There are many ways to do that.

The one that is used most often nowadays (most games and Microsoft applications work that way) is to use a database to record the registrations numbers that have been emitted, with any information that you might want to use to prevent many installations, date limit, number or runs limit, installations by more than one user, etc., anything you want to set as a limitation.

The numbers that you provide can be validated with some algorithm.

Here is a very simple example, where the programmer has decided that the sum of the first 3 digits multiplied by 4 would give the value of the next 3 digits:

123 024          (1+2+3)*4 = 024

If the user tries to type 123 011, the application will automatically rejects the number because the last group of digits does not give the result expected by the algorithm. Naturally, in real life, algorithms are more complex, and will often play with the ASCII value of registration number so that it is not as easy to decipher.

Once the registration number has been validated at the application level, it is sent to a server that validate its against the database and record in the database any information needed to manage the type of licence, such as the date of installation, incrementing a count of the number of installations, etc.

The server answers the application and tell it whether the registration is valid or not.

If the registration is not valid, you slap the user :-)

If the registration is valid, something is recorded on the users computer, maybe in the Windows registry.

The application checks against that information everytime it starts. If that information is there, the application knows that the registration was validated and starts.

Some applications will record the registration number so that the application gets back to the server everytime it is started without user intervention. This would be useful if you were providing a demo version that can be used a limited number of times or up to a given date. This could also be what you would do if you were Ubisoft and would like to piss off the people who paid for your application by preventing it from working when they are offline or that your server is down :-)

If the information is not where it is supposed to be when the application starts, that usually means that the application was not registered or that the user needed to reinstall for some reason, so the registration procedure is launched.
0
 
LVL 1

Author Comment

by:peterkiers
ID: 37762301
Thanks for the info.

Peter
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question