Solved

How to protect the application with a serial-number?

Posted on 2012-03-24
2
357 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now