views:

209

answers:

1

What is the purpose of FullTrust when SkipVerification exists?

I understand that FullTrust will give an assembly full access to any limitation that can be implemented through a CAS permission check. What I don't understand is why anyone would ever use it. We have access to SkipVerification which will completely skip the verification check (saving that overhead) and gives you the same access as FullTrust.

+1  A: 

It's not the same. From MSDN:

During just-in-time (JIT) compilation, an optional verification process examines the metadata and Microsoft intermediate language (MSIL) of a method to be JIT-compiled into native machine code to verify that they are type safe. This process is skipped if the code has permission to bypass verification.

Type Safety and Security

So while unverified code may be allowed to load, runtime demands for permissions not granted by the permission set would fail, as far as I know.

Josh Einstein