LuisFajardo
Wed Oct 19 16:43:04 CDT 2005
Jon, thanks for responding.
I'll like just clarify that I'm refering to private or internal methods
which are not intended to be use outside the application. Based on your
comments I imagine doesn't matter if is private or not, but I just want to
clarify that, specially because of the last statement in your response:
"unless you're in control of their box in the first place."
If there is nothing I can do about it, then, that's fine, I was just trying
last resources.
Thanks for your comments,
"Jon Skeet [C# MVP]" wrote:
> Luis Fajardo <LuisFajardo@discussions.microsoft.com> wrote:
> > I'm building a .NET application and I'll like to prevent some specific
> > methods to be accessible using reflection.
> >
> > I'll like to clarify, that what I'm looking for, is to completle disallow
> > the access to some methods thru reflection, special some methods related to
> > the licensing procedure of my application.
> >
> > I was trying to use ReflectionPermissionAttribute, but I believe is intended
> > to be use for other type of controls and not the one I'm looking for.
>
> You can't (AFAIK) stop reflection being used in a situation where the
> caller has "full trust". If they're running with less than full trust
> then some things about reflection (if not all) are automatically
> disabled, I believe - however, if this is to stop other people from
> calling some code, you can't prevent them from running your code *with*
> full trust unless you're in control of their box in the first place.
>
> --
> Jon Skeet - <skeet@pobox.com>
>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
> If replying to the group, please do not mail me too
>