Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wrote a software program in c# that I plan to sell online. I have no experience creating a product key/ registration system. The simplest solution would just be to send the same key to everyone when they register and put the key in the code to check but in theory that could get passed around or posted on internet forums etc.. . Is there a simple way to create a unique product key for each purchaser? The only way I can think of would be for the website to alter the code but that doesn't seem like a good solution.

Thanks in advance.

What I have tried:

PS I tried googling this but I get a ton of results which just show how to make the registration form which I already know how to do
Posted
Updated 21-Mar-17 9:20am
Comments
[no name] 21-Mar-17 13:52pm    
The easiest solution is to buy a ready made licensing package.
mikemar 21-Mar-17 14:09pm    
How would that work with the website I create since I have to email the registration code when they pay online? I apologize if this is a stupid question but I know absolutely nothing about how this stuff works?

Quote:
The simplest solution would just be to send the same key to everyone when they register and put the key in the code to check but in theory that could get passed around or posted on internet forums etc.. .

It is also the worst solution. It is not a theory either, it is common practice.

You have mainly 2 solutions:
-Offline: basically, you give a key to a customer and je can install on as many PC as he want unless you link the key to a PC.
-Online: the registration is 2 two steps, the user type a key anf the PC activate the key by reaching your license server.

With MS Office 97, the keys were simply divisible by 7.
 
Share this answer
 
Here is an interesting article on CodeProject which explains the use of certificates: A Ready To Use Software Licensing Solution in C#[^]
 
Share this answer
 

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