Re: Sandboxing AppDomain
From: Nicole Calinoiu (calinoiu)
Date: 08/22/05
- Next message: bassil: "Why Invoke ShellExecute in a installer get SE_ERR_ACCESSDENIED?"
- Previous message: Nicole Calinoiu: "Re: windows forms UserControl compiled with beta 2 doesn't work with IE"
- In reply to: kris: "Re: Sandboxing AppDomain"
- Next in thread: kris: "Re: Sandboxing AppDomain"
- Reply: kris: "Re: Sandboxing AppDomain"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 22 Aug 2005 11:26:29 -0400
"kris" <krsgoss@gmail.com> wrote in message
news:1124563307.946760.32560@g43g2000cwa.googlegroups.com...
> Hi Nicole, here is a more comprehensive code sample:
<snip>
Thanks, that really helped me with figuring out what you were doing.
> If within CreateAppDomain, I substitute my created PermissionSet for a
> NamedPermissionSet with the "Internet" name specified, the code works
> (sort of.) As I was writing this I just realized that even under the
> NamedPermissionSet, the code is able to instantiate the SaveFileDialog,
> which should be prohibited under the Internet level of trust. :-(
That's because creating a permission set from a name doesn't actually
populate the new permission set with the policy-set permissions for the
named permission set. Instead, something like "new NamedPermissionSet("any
name")" generates an _unrestricted_ permission set (same as FullTrust).
> Any help on sorting this out is really appreciated!
Your underlying problem is that the target assembly doesn't have sufficient
permissions to deal with the remoting plumbing. You might want to re-read
the parts of Shawn's blog postings that deal with the use of
MarshalByRefObject. Here are some pointers:
1. The MarshalByRefObject subtype that will be the remoting invocation
target should be in a fully trusted assembly that you will create (not the
in the plug-in implementation assembly).
2. You should call the plug-in implementation from a copy of the assembly
described in #1 that has been loaded into the restricted app domain.
3. The policy for the restricted app domain should restrict the permissions
of all assemblies other than the "conductor" assembly described in #1.
4. Since the plug-in implementations will not be remoting targets (at least
with respect to the permissions restriction mechanism), there's no need for
them to subclass MarshalByRefObject.
Does that make a bit more sense?
- Next message: bassil: "Why Invoke ShellExecute in a installer get SE_ERR_ACCESSDENIED?"
- Previous message: Nicole Calinoiu: "Re: windows forms UserControl compiled with beta 2 doesn't work with IE"
- In reply to: kris: "Re: Sandboxing AppDomain"
- Next in thread: kris: "Re: Sandboxing AppDomain"
- Reply: kris: "Re: Sandboxing AppDomain"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|