Turn off transparency to perform CAS Asserts
- by MainMa
Hi,
I apologize if my question is too stupid.
I want to run from a sandboxed application a method from a full trusted assembly. But when trying to do so, as described in C# 4.0 in a Nutshell: The Definitive Reference, Fourth Edition, Chapter 20, each time I call Permission.Assert, an
InvalidOperationException "Cannot
perform CAS Asserts in Security
Transparent methods"
is thrown.
So how is it possible to turn off transparency to be able to use CAS Asserts?