S
SA
Hi all,
(I know this has been asked before, but I could not find a reply.)
I want to restrict the callers of my business logic DLL. The assembly should
be called only by my service interfaces.
However, when I try this (in assemblyinfo.vb):
<Assembly: StrongNameIdentityPermission( _
SecurityAction.LinkDemand, _
PublicKey:="<goes here>")>
the assembly doesn't compile, apparently becuase LinkDemand is not allowed
at assembly level?
Then I tried
<Assembly: StrongNameIdentityPermission( _
SecurityAction.RequestMinimum, _
PublicKey:="<goes here>")>
That doesn't work: every client can call my assembly, no matter which public
key they have.
When I switch to
<StrongNameIdentityPermission( _
SecurityAction.LinkDemand, _
PublicKey:="<goes here>")> _
Public Class SomeBizLogic
....
it does work: only clients with that specific public key can call into that
class.
However, because that assembly will be expanded with more classes, I don't
want to have to put that attribute in front of every class (just in case I
forget, etc.).
What is the correct way to enforce this permission at assembly level?
Thanks,
(I know this has been asked before, but I could not find a reply.)
I want to restrict the callers of my business logic DLL. The assembly should
be called only by my service interfaces.
However, when I try this (in assemblyinfo.vb):
<Assembly: StrongNameIdentityPermission( _
SecurityAction.LinkDemand, _
PublicKey:="<goes here>")>
the assembly doesn't compile, apparently becuase LinkDemand is not allowed
at assembly level?
Then I tried
<Assembly: StrongNameIdentityPermission( _
SecurityAction.RequestMinimum, _
PublicKey:="<goes here>")>
That doesn't work: every client can call my assembly, no matter which public
key they have.
When I switch to
<StrongNameIdentityPermission( _
SecurityAction.LinkDemand, _
PublicKey:="<goes here>")> _
Public Class SomeBizLogic
....
it does work: only clients with that specific public key can call into that
class.
However, because that assembly will be expanded with more classes, I don't
want to have to put that attribute in front of every class (just in case I
forget, etc.).
What is the correct way to enforce this permission at assembly level?
Thanks,