suppose i have developed class library and i want the i can use this library in my project only but if someone try to copy the dll file and want to use it in his project then he will not be able to do so. so i just want to know how could embed this type of security in the dll file...please tell me all ways. thanks
You could verify in your assembly the PublicKeyToken of the calling signed assembly.
The second example is in VB.NET, couldn't find a C# version readily but you'll get the idea.
Be aware that this is not an absolutly secure way, because someone could still decompile your assembly. But if it's just to prevent that your library is used in other projects, this might be an acceptable way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With