What is Code Access Security (CAS) in .NET?
CAS is a part of the .NET Security Model that determines whether or not a piece of code is allowed to run, and what resources it can use when it is running. For instance, it is CAS that will prevent a .NET web application from formatting your hard disk. The CAS security policy revolves around two key concepts – code groups and permissions. Each .NET assembly is a member of a particular code group, and each code group is granted the permissions specified in a named permission set.