Re: Basic permission attribute question: RequestRefuse

From: Keith Patrick (richard_keith_patrick_at_nospam.hotmail.com)
Date: 07/26/03


Date: Fri, 25 Jul 2003 17:33:24 -0500


I guess I'm not quite understanding the true meaning of "Unrestricted". My
thinking was that if Unrestricted=true, the refusal is unrestricted only on
FileDialogPermission; I am missing it affects the entire assembly's grant
set.

"Eugene V. Bobukh [MS]" <eugenebo@online.microsoft.com> wrote in message
news:%23GNTsluUDHA.2564@tk2msftngp13.phx.gbl...
When you refuse any of the permissions, the assembly grant set is not
Unrestricted anymore. If the assembly contains some APIs that require
Unrestricted security in order to run, you'll get the SecurityException even
if you don't use FileDialog.

-- 
Eugene V. Bobukh
This message is provided "AS IS" with no warranties, and confers no rights.
Any opinions or policies stated within it are my own and do not necessarily
constitute those of my employer.
----
"Keith Patrick" <richard_keith_patrick@nospam.hotmail.com> wrote in message
news:%23CYOP%23oUDHA.2568@tk2msftngp13.phx.gbl...
> I have a Windows service that will not run if I have the following line in
> my code:
> [assembly:FileDialogPermissionAttribute(SecurityAction.RequestRefuse,
>
> Unrestricted = true)]
>
>
>
> For some reason, I cannot see why the above code would raise a
> SecurityException, as I never use a FileDialog.  In fact, this behavior
> happens for every permission I try it on.  Could someone explain to me why
> this is the case?  As best I can tell, Unrestricted is a problem, but I'm
> just not seeing how, though.
>
>


Relevant Pages

  • Re: Basic permission attribute question: RequestRefuse
    ... When you refuse any of the permissions, the assembly grant set is not Unrestricted anymore. ... If the assembly contains some APIs that require Unrestricted security in order to run, you'll get the SecurityException even if you don't use FileDialog. ...
    (microsoft.public.dotnet.security)
  • Basic permission attribute question: RequestRefuse
    ... I have a Windows service that will not run if I have the following line in ... SecurityException, as I never use a FileDialog. ... happens for every permission I try it on. ...
    (microsoft.public.dotnet.security)