Share via


Identity Permissions

Identity permissions represent characteristics that identify an assembly. The common language runtime grants identity permissions to an assembly based on the information it obtains about the assembly. This information, called evidence, is provided by the loader or a trusted host and can include items such as the digital signature of the assembly or the Web site where it originates. Each identity permission represents a particular kind of evidence that an assembly must have in order to run. For example, one permission represents the strong name an assembly must have, another represents the Web site where the code must have originated, and so on.

Because the identity permissions have a set of functionality in common with code access permissions, they are derived from the same base class as the code access permissions, CodeAccessPermission.

Identity permissions help protect code from unauthorized access. The runtime grants identity permissions when the assembly is loaded based on the evidence that is provided. Although identity permissions can be requested, they cannot be granted unless the code has the proper identity evidence. Identity permissions can also be demanded.

The .NET Framework provides the following identity permissions.

Class name

Identity represented

PublisherIdentityPermission

The software publisher's digital signature.

SiteIdentityPermission

The Web site where the code originated.

StrongNameIdentityPermission

The strong name of the assembly.

URLIdentityPermission

The URL where the code originated (including the protocol prefix — http, https, ftp, and so on).

ZoneIdentityPermission

The zone where the code originated. For more information, see System.Security.SecurityZone.

See Also

Concepts

Security Permissions

Reference

CodeAccessPermission