CodeGroupTypeEnum Enum

Defines the types of code groups that can be used in the .NET Code Access Security (CAS) model. This enumeration is part of the legacy CAS system and is generally not used in modern .NET Core or .NET 5+ applications.

Syntax

public enum CodeGroupTypeEnum

Members

The CodeGroupTypeEnum enumeration defines the following members:

HashForAllCodegroups Represents a code group where all code is granted permissions.
NetCodeGroup Represents a code group based on network origin.
AllCode Represents a code group that applies to all code.
SiteCodeGroup Represents a code group based on the originating site.
Zone Represents a code group based on the security zone of origin.

Remarks

The Code Access Security (CAS) model in older versions of the .NET Framework provided a mechanism for controlling the permissions granted to code based on its origin or other characteristics. Code groups were a fundamental part of this system, allowing administrators to define policies that mapped specific types of code to particular permission sets.

The CodeGroupTypeEnum enumerates the predefined types of code groups that could be created and managed through the CAS policy tools.

Note: Code Access Security (CAS) is a legacy feature and is not supported in .NET Core, .NET 5, and later versions. For modern security needs, consider using other security mechanisms such as role-based security, authentication, and authorization.