|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Loading permission setsHi all,
Is there any way to load a System.Security.PermissionSet with all the permissions that are defined in the runtime security policy for a specific zone? For example I want to set up an application to simulate running in a browser, so I want it to be set up with all the permissions defined in the Internet permission set that you see in the Runtime Security Policy editor. Any ideas welcome. John --- Blog: http://www.dotnetjunkies.com/weblog/johnwood PermissionSet permissions;
evidence = new Evidence( new object[] { new Zone(SecurityZone.Internet) }, new object[] { }); permissions = SecurityManager.ResolvePolicy(evidence); --------------------------------------- Dominick Baier - DevelopMentor http://www.leastprivilege.com Show quoteHide quote > Hi all, > > Is there any way to load a System.Security.PermissionSet with all the > permissions that are defined in the runtime security policy for a > specific zone? For example I want to set up an application to simulate > running in a browser, so I want it to be set up with all the > permissions defined in the Internet permission set that you see in the > Runtime Security Policy editor. > > Any ideas welcome. > > John > --- > Blog: http://www.dotnetjunkies.com/weblog/johnwood Thanks Dominick.
Once I have the permission set, how would I go about denying all the permissions that the Internet zone excludes? Performing a Deny on the permission set you specify below doesn't seem to work for me... using the overloaded ResolvePolicy that outputs the denied permissionset just raises an exception 'Execution permission cannot be acquired' - not sure what I'm doing wrong? Thanks again. John Show quoteHide quote "Dominick Baier [DevelopMentor]" <dbaier@pleasepleasenospamdevelop.com> wrote in message news:4580be631a124b8c867e55bb55681@news.microsoft.com... > PermissionSet permissions; > > evidence = new Evidence( > new object[] { new Zone(SecurityZone.Internet) }, > new object[] { }); > > permissions = SecurityManager.ResolvePolicy(evidence); > > --------------------------------------- > Dominick Baier - DevelopMentor > http://www.leastprivilege.com > >> Hi all, >> >> Is there any way to load a System.Security.PermissionSet with all the >> permissions that are defined in the runtime security policy for a >> specific zone? For example I want to set up an application to simulate >> running in a browser, so I want it to be set up with all the >> permissions defined in the Internet permission set that you see in the >> Runtime Security Policy editor. >> >> Any ideas welcome. >> >> John >> --- >> Blog: http://www.dotnetjunkies.com/weblog/johnwood > >
At What Point Does the Security Begin?
Need advise... Help : Access denied ??? Programmatically Install Certificate into Windows Certificate Store Kerberos and forms authentication Bad Data with DES Decryption Active Directory and ASP.NET 2.0 permission for socket access IDentifiy user acl on a folder ???? Proxy server authentication |
|||||||||||||||||||||||