Re: Help on Creating a Custom Permission
From: Doug Bahr (dbahr_at_hotmail.com)
Date: 10/27/03
- Next message: Reggie Chen: "StrongNameIdentity check only works on my developmemt machine"
- Previous message: Russell B. Eggen: "Re: Enabling Access to Private Fields"
- In reply to: Pieter Philippaerts: "Re: Help on Creating a Custom Permission"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 27 Oct 2003 14:02:38 -0500
Thank you for you reply.
It is the first bit of news that I have found that explains why the custom
attribute does NOT
get called declaratively.
I guess that the documentation on "Adding Declarative Security Support" is
then incomplete
because it does not state that the CustomPermissionSecurityAttribute must be
derived
from the CodeAccessSecurityAttribute to have the compiler find and work with
it.
Thanks for your help.
Doug.
"Pieter Philippaerts" <Pieter@nospam.mentalis.org> wrote in message
news:e23pOOpmDHA.744@tk2msftngp13.phx.gbl...
> "Doug Bahr" <dbahr@hotmail.com> wrote in message
> > Does anyone have any advice on how to create my own Custom Permission?
> > I do NOT want a stack walk when the permission demand is invoked so I
> think
> > that I should not derive the custom permission from the Code Access
> > Permission.
>
> Here's a comment I found in Microsoft's SSCLI source code: "Note:
> PrincipalPermissionAttribute currently derives from
> CodeAccessSecurityAttribute, even though it's not related to code access
> security. This is because compilers are currently looking for
> CodeAccessSecurityAttribute as a direct parent class rather than
> SecurityAttribute as the root class."
>
> So I'm afraid you're out of luck and that you should inherit from the
> CodeAccessSecurityAttribute class. This may be fixed in future versions of
> the framework.
>
> Regards,
> Pieter Philippaerts
> Managed SSL/TLS: http://www.mentalis.org/go.php?sl
>
>
- Next message: Reggie Chen: "StrongNameIdentity check only works on my developmemt machine"
- Previous message: Russell B. Eggen: "Re: Enabling Access to Private Fields"
- In reply to: Pieter Philippaerts: "Re: Help on Creating a Custom Permission"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|