views:

261

answers:

1

I have a FullTrust assembly, Assembly A, which calls a 3rd party component, Assembly B. Is there any way I can, via A.dll.config or in A's code, prevent any CAS demands from propagating up the stack to Assembly B, which does not have FullTrust?

I do not want to alter the machine's security policy, if possible.

A: 

You could create a separate appdomain, using the sandboxing API in 2.0. MSDN explains it far better than I can. Of course then you're marshalling over appdomains; but if you want isolation that's the price you have to pay.

blowdart