Caution Code Access Security (CAS) and Partially Trusted Code The .NET Framework provides a mechanism for the enforcement of varying levels of trust on different code running in the same application called Code Access Security (CAS). CAS is not supported in .NET Core, .NET 5, or later versions. CAS is not supported by versions of C# later than 7.0. CAS in .NET Framework should not be used as a mec