Class Access Restriction

Discussion in 'ASP .Net' started by nicksertis@gmail.com, Nov 13, 2006.

  1. Guest

    Hi All,

    I have a solution which has two assemblies (dll files) which call each
    other's classes and methods. This is fine as the public methods are
    intended for this use.

    I would like to protect some of these methods, as they related to core
    data access. Since my assemblies will be used in larger applications by
    other developers, I want my code (across my two assemblies) to be the
    only code which can access them.

    Is there a straightforward way to do this? I have investigated creating
    web modules and them compiling them all into one assembly (and also
    making the methods "internal") but it is a bit messy so am looking for
    a better solution.

    It is not feasible to merge all the assemblies into one assembly.

    If you have any input on this topic that would be great.

    Thanks,
     
    , Nov 13, 2006
    #1
    1. Advertising

  2. Guest

    Hi All,

    I think I have found a solution. For those of you using .NET 2.0 you'll
    be able to make use of a new feature called Friendly Assemblies. It
    allows you to give external assemblies access to "internal" methods.

    http://msdn2.microsoft.com/en-us/library/0tke9fxk.aspx

    Hope that helps,

    wrote:
    > Hi All,
    >
    > I have a solution which has two assemblies (dll files) which call each
    > other's classes and methods. This is fine as the public methods are
    > intended for this use.
    >
    > I would like to protect some of these methods, as they related to core
    > data access. Since my assemblies will be used in larger applications by
    > other developers, I want my code (across my two assemblies) to be the
    > only code which can access them.
    >
    > Is there a straightforward way to do this? I have investigated creating
    > web modules and them compiling them all into one assembly (and also
    > making the methods "internal") but it is a bit messy so am looking for
    > a better solution.
    >
    > It is not feasible to merge all the assemblies into one assembly.
    >
    > If you have any input on this topic that would be great.
    >
    > Thanks,
     
    , Nov 13, 2006
    #2
    1. Advertising

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. =?Utf-8?B?RWQ=?=

    file restriction - Forms authentication

    =?Utf-8?B?RWQ=?=, May 31, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    395
    Jim Cheshire [MSFT]
    Jun 1, 2004
  2. =?Utf-8?B?Q2hyaXN0aWFuIE51bmNpYXRv?=

    Scripted Window Restriction?

    =?Utf-8?B?Q2hyaXN0aWFuIE51bmNpYXRv?=, Oct 5, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    409
    =?Utf-8?B?Q2hyaXN0aWFuIE51bmNpYXRv?=
    Oct 5, 2004
  3. E11
    Replies:
    1
    Views:
    4,941
    Thomas Weidenfeller
    Oct 12, 2005
  4. Sameer
    Replies:
    1
    Views:
    1,794
  5. Prabhat

    Page Access Restriction

    Prabhat, May 1, 2006, in forum: ASP General
    Replies:
    4
    Views:
    134
    Evertjan.
    May 1, 2006
Loading...

Share This Page