Basic permission attribute question: RequestRefuse

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


Date: Fri, 25 Jul 2003 04:31:46 -0500


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: Refusing all permissions
    ... OK, I tried various things (keep in mind this is a Windows service), ... Is there some tool out there I can use to see what permission is lacking? ... If you truly need to refuse even execution for some reason, ... > Does anyone know how to "properly" declare that an assembly requires no ...
    (microsoft.public.dotnet.security)
  • Re: Checking security at startup?
    ... exception on creation when code has the Internet permission set. ... the actual code that generates the SecurityException (if ... the creation of the the SqlClientPermission: ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Refusing all permissions
    ... The command line tool that can display assembly requests is called permview.exe. ... > OK, I tried various things (keep in mind this is a Windows service), ... > Is there some tool out there I can use to see what permission is lacking? ... > If you truly need to refuse even execution for some reason, ...
    (microsoft.public.dotnet.security)
  • Re: When to explicitly check permission
    ... > SecurityException instead would there? ... Directory.GetCurrentDirectory method will implement a demand for ... > should I do an explicit check my self before I call the method? ... performing a preliminary demand for the same permission. ...
    (microsoft.public.dotnet.security)
  • 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)