Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Protect my class Libraries, can I?

Reply
Thread Tools

Protect my class Libraries, can I?

 
 
Cablito
Guest
Posts: n/a
 
      09-20-2004
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.



 
Reply With Quote
 
 
 
 
richlm
Guest
Posts: n/a
 
      09-21-2004
You could use
"System.Security.Permissions.StrongNameIdentityPer missionAttribute"
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.


 
Reply With Quote
 
 
 
 
Olaf Baeyens
Guest
Posts: n/a
 
      09-22-2004
> You could use
> "System.Security.Permissions.StrongNameIdentityPer missionAttribute"
> 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.
>


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.Inheri tanceDemand,PublicKey="00
24000004....1")]
[StrongNameIdentityPermission(SecurityAction.LinkDe mand,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.


 
Reply With Quote
 
Jonathan Allen
Guest
Posts: n/a
 
      09-25-2004
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.

--
Jonathan Allen


"Cablito" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>
>



 
Reply With Quote
 
Rakesh Rajan
Guest
Posts: n/a
 
      09-27-2004
Hi Cablito,

Have a look at "Licensing Components and Controls" in MSDN:
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconlicensingcomponentscontrols.asp

HTH,
- Rakesh Rajan

"Cablito" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
best way to protect class instance variables Barun Singh Ruby 8 02-09-2009 04:56 AM
Protect sensitive string in .class dagarwal82@gmail.com Java 9 02-12-2007 05:31 PM
Protect class files from decompilation Dave Java 7 01-11-2007 07:50 AM
help: derived class uses base class protect value tomy C++ 5 07-24-2006 03:01 PM
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM



Advertisments