Re: using webpermissions

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 09/28/04


Date: Tue, 28 Sep 2004 10:56:14 -0400

Chris,

    No, you can not grant permissions that you do not have with this. If
the code you are running has permissions to access a website, then you can
call Assert on the permission to prevent stack walks asking for that
permission from going further up (the Assert will fail if you try and assert
a permission you don't have access to). Additionally, if you have code
running that you don't trust, then you can call Deny to deny the permission.

-- 
               - Nicholas Paldino [.NET/C# MVP]
               - mvp@spam.guard.caspershouse.com
"Chris C" <cmrchs@yahoo.com> wrote in message 
news:eane6oWpEHA.1992@TK2MSFTNGP09.phx.gbl...
> Hi Nicholas,
>
> I just try to understand how to use it.
>
> when I use a permissionObject
>  myWebP.AddPermission(NetworkAccess.Connect,URL_LINUX);
>
> how do I use it then , does it mean that I allow access then to the 
> UNIX-site ... but to whom ???
>
> and what if I call myWebP.Deny() afterwards, does it make sense at all ??
>
> thnx
> Chris
>
>
> **********************************************************************
> Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
> Comprehensive, categorised, searchable collection of links to ASP & 
> ASP.NET resources... 


Relevant Pages

  • Re: security/strong name/zones clarification needed
    ... Does the Assert code go in its ... >>this AppDomain needs to be setup before your assembly can ... >>will recieve the permission grant you expect (in this ... All my assemblies are strong named. ...
    (microsoft.public.dotnet.security)
  • Re: Identity Permission and Code Access Permission classes
    ... do is do an Assert on that permission, and the Assert will be found in the ... Are you saying you can override an existing Deny that my application has ... Note also, that stack walk modifiers do not discriminate between different kinds of code, if you do a Deny for that FileIO permission, no ...
    (microsoft.public.dotnet.security)
  • Re: Identity Permission and Code Access Permission classes
    ... I'm working on a several-part blog series on Assert ... however a lot of the concepts will apply to the other stack modifiers as well. ... >Subject: Re: Identity Permission and Code Access Permission classes ... and you want to protect its contents from modification by ...
    (microsoft.public.dotnet.security)
  • Re: Can an Assert issued following a Deny override it?
    ... Permission to assert is granted via the Assertion flag on ... It can be denied via policy as you would any other ... > issued a Deny on a particular permission. ...
    (microsoft.public.dotnet.security)
  • Re: Code Acess Security
    ... Assert is used to prevent a stack walk. ... - My assembly is granted permission A as well as the permission to Assert ... Note that there are some major assemblies in the ...
    (microsoft.public.dotnet.security)