Re: Basic permission attribute question: RequestRefuse

From: Eugene V. Bobukh [MS] (eugenebo_at_online.microsoft.com)
Date: 07/25/03


Date: Fri, 25 Jul 2003 13:15:05 -0700


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
    ... I guess I'm not quite understanding the true meaning of "Unrestricted". ... When you refuse any of the permissions, the assembly grant set is not ... Unrestricted security in order to run, you'll get the SecurityException even ... as I never use a FileDialog. ...
    (microsoft.public.dotnet.security)
  • Re: Checking security at startup?
    ... And as i said earlier the exception ... the actual code that generates the SecurityException (if ... SqlClientPermission p = new SqlClientPermission; ... but if I for instance test if i have permissions to write ...
    (microsoft.public.dotnet.framework.aspnet.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)