Question

If you have a WPF control library which you wanted to license to developers, how do enforce license restrictions such that the library could be used and distributed in their own applications and yet prevent the end-users from reusing that .dll?

I'm approaching this from a strict business perspective, so I'm trying to find a solution that wouldn't allow indiscriminating users to do something as simple as pass the .dll around with the key and be able to share it.

Any thoughts on this are absolutely welcome and feel free to wax philosophical.

Was it helpful?

Solution

Strictly speaking, these kind of problems are really hard to solve completely, and whatever you do, it WILL be possible (though it might be hard enough) to alter the IL code that validates the license and bypass the check completely. However, if you're really comfortable with it, you could force your clients to submit the compiled version of their application to you to apply a strong name to it (using your private key). This way, you can check the public key token of the calling assembly against a specific key that only you own. By no means I suggest such a method for generic use, but if it's REALLY THAT NECESSARY to do so, this could work. Just keep in mind that it would probably take a few hours to find the license checking code in your assembly and removing it altogether. This will render any license restriction useless!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top