Turn off transparency to perform CAS Asserts

Posted by MainMa on Stack Overflow See other posts from Stack Overflow or by MainMa
Published on 2010-04-13T21:29:37Z Indexed on 2010/04/13 21:33 UTC
Read the original article Hit count: 1440

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?

© Stack Overflow or respective owner

Related posts about transparency

Related posts about appdomain