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

I need to give liciensing for my project.

Once my project(software) is installed.i need to track the date when it is installed then from that date after 15 days.should display the messages 15 days trail version software expires.

Then i will genereate the license key from License Manager and give the access to my software..

How to implement this part in Windows application in C#.net

Thanks in advance.
Posted
Updated 5-Jul-11 19:16pm
v2
Comments
Mohsin Afzal 15-Jul-15 3:35am    
Hello Sir , I have the same question for my application i made an application but now i need to make a license , i don't have any idea how to make this license this is my first application in C#.net using SQL SERVER 2008 , Please Help me to solve this as soon as possible , if possible Please Provide my code . Thanks my email is mohsinafzal.s13@gmail.com .. Please Help me.
Philippe Mori 15-Jul-15 12:19pm    
Do you want to validate license with a server? If so, then a commercial product might make sense particulary if you don't already have a web server for licenses...

When your application start at first time, at that time create a raw key which will contain
MAC address of system,
Current DateTime, and
additional details.

Then encrypt the Raw key with any algo.

Create another application (License Generator) which will decrypt the raw key and generate a license key for you.

License key will contain the details of :
MAC address(from raw key)
Current DateTime(from raw key)
Application Type (Demo or License) (from License Generator)
If demo that Expiry days (from License Generator)

Then encrypt the license details

Then take that license key and put it into actual application.

On every start you can check the expiry days.

You can store the Raw Key and License Key in Database, application Properties or in config file.
 
Share this answer
 
Comments
vpmanu 6-Jul-11 1:22am    
What wil happen wen user change the system date?
Uday P.Singh 6-Jul-11 1:34am    
In that case i think you have to check it in registry.
[no name] 6-Jul-11 1:36am    
yes, you can do that.
Member 12549562 19-Sep-16 8:00am    
when and where we need to create registry because if i create it at form load time then it crate alwase when ever we reopen our Application
As for your problem regarding tracking the date installed for trial versions, you may refer here[^] as this was also a question asked before.

A friendly reminder, never post your questions as a solution. Rather, post it as a comment to the solutions, or you can create a new question if its a different issue.
 
Share this answer
 
Use a ready-to-use scheme like CryptoLicensing for this - it supports trial licenses (x days, X unique days, etc), then you can issue them full licenses without any trial limits. It comes with a ready "evaluation info dialog" which can show "X of Y days remaining," and also allow user to enter the full license code.
 
Share this answer
 
1. Saved Dates for license should be in encrypted form in database table.
2. License Period information should be get from database table and should be decrypted to calculate difference of days
3.A user can change system date but cant change database server dates and if a user will change database server date then user cant decrypt already encrypted dates values stored in database table.
hope it helps or let me know for description and explanation with code.
 
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