C# Application License Components and Controls [closed]
Asked Answered
G

5

5

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

Gerhardt answered 5/8, 2011 at 18:39 Comment(0)
S
8

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
Spital answered 5/8, 2011 at 19:30 Comment(2)
That means I have to create a license along with my application for each deployment?Gerhardt
At the first time you need to create a license. And in that you need to set the expiry date and system info. If any value is changed or modified then in that case, again you have to generate a new license for the application.Spital
S
4

The industry-standard way of preventing users from running an application on more than one machine is indeed to lock your product to some parameters of that system. However, you need to think about the following issues to avoid future work or upset customers down the road. Crude systems that don't deal with these issues have given node-locking a bad name, but when done properly node-locking is unobtrusive, flexible and secure:

  • How will you accurately obtain the system parameters you will lock to? Asking users to read/type them is a common source of error, for example by mis-reading an 'l' for a '1' or a '0' for an 'O'.
  • The MAC address is commonly used for node-locking, but this is a poor choice as the MAC address can be set by an admin under many operating systems.
  • Say you lock a license to several parameters of the system. What will happen if the user does a minor system upgrade, so causing one of them to change? They won't be happy if your app suddenly refuses to run.
  • Users will want to move their license to a different machine at some point. You'll need to think about how you support this without making it a security hole.
  • Users machines will crash - it happens. How can they get their license running again on their new/rebuilt system?

Just some issues we've encountered and dealt with in our solutions. Hope this helps.

Specular answered 9/8, 2011 at 17:42 Comment(0)
A
2

I use Infralution License Tracker. It is payware but allows for licensing of some part or all of an application. It also allows for key verification on on-line verification. It is possible to use customer information to generate the key so it should be feasible to register using information from the target computer.

http://www.infralution.com/licensing.html

Appeal answered 5/8, 2011 at 19:46 Comment(0)
B
0

When you want it really easy you can use LimeLM. Simple online-verification with a trial option.

Brilliance answered 5/8, 2011 at 21:48 Comment(0)
C
0

You need to use machine-locked / activated licenses to prevent this. This ensures that the license can only be validated from a single machine - if license validation fails, you can decide what steps to take - whether to exit the app, show a message to the user, allow a grace period, etc.

Try CryptoLicensing which supports activated / machine-locked licenses.

DISCLAIMER: I work for LogicNP Software, the developer of CryptoLicensing.

Cis answered 3/5, 2012 at 10:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.