Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Application License Components and Controls [closed]

If I have 5 target computers and I am going to install my application to one of those target computers. How I prevent users from copying my application to other target computers?

To make it clear, I don't want them to copy my application after installation (They should not copy my application from the installed application folder). The problem is now I setup and deploy my application using Visual Studio 2010 Setup and Deployment, but anyone can copy my application folder after the installation for example, my application folder (exe, DLLs, and resources) locates at "Program Files/MyApplication". They actually can copy my application from that folder and paste it to other computers then use it. Of course, they can copy it but I think they should not be able to use my copied application right? Is there a way to protect them copying my application? I have to write an additional code?

I am really new for software distribution. Please guide me what I have to do. Thanks

like image 456
Apichart Thanomkiet Avatar asked Aug 05 '11 18:08

Apichart Thanomkiet


1 Answers

You can use Rhino Licensing framework for license file generation. It has LicenseGenerator class which has a Generate method. Here is what it looks like:

 public string Generate(string name, Guid id, DateTime expirationDate, IDictionary<string, string> attributes, LicenseType licenseType);

Generate method takes the name of the licensee. Unique id for the license which can be generate as Guid.NewGuid(), the expiration date and the attributes dictionary is a place where you can store a custom key value pair in the license file.

The way it can works is that, you can embed the information of the machine in the license and in the verification phase you can check whether the license belongs to the same machine. This means that you can not copy license file of one machine and put it on another machine because it won't work.

In the license file you can store the following information:

  • The expiry date of the license
  • Name of the person for whom the license is generated
  • Hash calculated based on the system information
like image 165
Mukesh Rawat Avatar answered Sep 30 '22 00:09

Mukesh Rawat