Protect my class Libraries, can I?

Discussion in 'ASP .Net' started by Cablito, Sep 20, 2004.

  1. Cablito

    Cablito Guest

    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.
     
    Cablito, Sep 20, 2004
    #1
    1. Advertisements

  2. Cablito

    richlm Guest

    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.
     
    richlm, Sep 21, 2004
    #2
    1. Advertisements

  3. Cablito

    Olaf Baeyens Guest

    > 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.
    >


    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.
     
    Olaf Baeyens, Sep 22, 2004
    #3
  4. 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" <> wrote in message
    news:...
    > 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.
    >
    >
    >
     
    Jonathan Allen, Sep 25, 2004
    #4
  5. Cablito

    Rakesh Rajan Guest

    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

    "Cablito" <> wrote in message
    news:...
    > 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.
    >
    >
    >
     
    Rakesh Rajan, Sep 27, 2004
    #5
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. E11
    Replies:
    1
    Views:
    5,137
    Thomas Weidenfeller
    Oct 12, 2005
  2. Dave
    Replies:
    7
    Views:
    745
  3. tomy
    Replies:
    5
    Views:
    499
    Marcus Kwok
    Jul 24, 2006
  4. Karsten Wutzke
    Replies:
    21
    Views:
    984
    Roedy Green
    Jun 29, 2007
  5. Sriram Srinivasan
    Replies:
    13
    Views:
    634
    Benjamin Kaplan
    Nov 12, 2009
Loading...

Share This Page