Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2004

Tip: Looking for answers? Try searching our database.

Protect my class Libraries, can I?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cablito - 20 Sep 2004 14:30 GMT
Is there a way to protect my class libraries?

I have for instance, a class library full of my base forms and classes
latter inherited by various projects.

A lot of logic is within those objects and I?d hate to see other companies
or individuals being able to add my DLLs to their .NET solution and using it
at will.
richlm - 21 Sep 2004 21:24 GMT
You could use
"System.Security.Permissions.StrongNameIdentityPermissionAttribute"
You will need to sign all your assemblies that call the ones you want to
protect with the appropriate key.
Any "foreign" assemblies that try to call your protected ones should get a
security exception.

You can use the attribute at assembly, class, constructor or method level.

It's not impossible to circumvent but better than nothing.
Olaf Baeyens - 22 Sep 2004 10:10 GMT
> You could use
> "System.Security.Permissions.StrongNameIdentityPermissionAttribute"
[quoted text clipped - 6 lines]
>
> It's not impossible to circumvent but better than nothing.

Are you sure about this?
I assume that you must also add this, since strong naming  will not prevent
VS to use your controls in your strong named  dll:

   using System.Security.Permissions;

[StrongNameIdentityPermission(SecurityAction.InheritanceDemand,PublicKey="00
24000004....1")]
[StrongNameIdentityPermission(SecurityAction.LinkDemand,PublicKey="0024000
004....1")]
   public class MyClass : {
       ....
   }

Note: Do not use SecurityAction.LinkDemand for drag&drop controls intended
to be used by VS since it generates some permission error. This is logical
since VS has a different public key.
Jonathan Allen - 25 Sep 2004 06:27 GMT
Write good license agreements, slap a bunch of copyrights on it, and be
prepared to hire a lawyer. There is no way to truly protect source code.

Signature

Jonathan Allen

> Is there a way to protect my class libraries?
>
[quoted text clipped - 4 lines]
> or individuals being able to add my DLLs to their .NET solution and using it
> at will.
Rakesh Rajan - 27 Sep 2004 19:14 GMT
Hi Cablito,

Have a look at "Licensing Components and Controls" in MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconlicensingcomponentscontrols.asp

HTH,
- Rakesh Rajan

> Is there a way to protect my class libraries?
>
[quoted text clipped - 4 lines]
> or individuals being able to add my DLLs to their .NET solution and using it
> at will.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.