Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a class library assembly (.dll) file. At the main GUI
application, this assembly is referenced and used.

If I redistribute these files with my application, somebody can also
add the class library assembly to their .NET project. How to prevent others to use my class library assemly files?
Posted

http://www.codeguru.com/csharp/csharp/cs_misc/security/article.php/c8329[^]

http://www.codeproject.com/KB/security/UB_CAS_NET.aspx#Security Namespace


Or another way would be to add logic (using reflection) to your class to prevent it being called by any assembly that doesn't match the one you want to allow...

http://www.eggheadcafe.com/software/aspnet/34287552/prevent-dll-usage.aspx[^]
 
Share this answer
 
Comments
strogg 7-Dec-10 13:50pm    
Some very interesting links. Thanks!
Write it in C++ so that they can't break your protection with reflector, then add a security layer so that they need to know a password or you identify the calling assembly or something.
 
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