System.Security.Permissions.PublisherIdentityPermissionAttribute Class

Allows security actions for System.Security.Permissions.PublisherIdentityPermission to be applied to code using declarative security. This class cannot be inherited.

See Also: PublisherIdentityPermissionAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.All, AllowMultiple=true, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class PublisherIdentityPermissionAttribute : CodeAccessSecurityAttribute

Remarks

The scope of the declaration that is allowed depends on the System.Security.Permissions.SecurityAction that is used.

The properties PublisherIdentityPermissionAttribute.CertFile, PublisherIdentityPermissionAttribute.SignedFile, and PublisherIdentityPermissionAttribute.X509Certificate are mutually exclusive.

The security information declared by a security attribute is stored in the metadata of the attribute target and is accessed by the system at run time. Security attributes are used only for declarative security. For imperative security, use the corresponding permission class.

Note:

Starting with the net_v40_long, identity permissions are not used.

   In the .NET Framework versions 1.0 and 1.1, identity permissions cannot have an PermissionState.Unrestricted permission state value. Starting with the .NET Framework version 2.0, identity permissions can have any permission state value. This means that in 2.0 and later versions, identity permissions have the same behavior as permissions that implement the System.Security.Permissions.IUnrestrictedPermission interface.

Note:

By default, code access security does not check for System.Security.Policy.Publisher evidence. Unless your computer has a custom code group based on the System.Security.Policy.PublisherMembershipCondition class, you can improve performance by bypassing Authenticode signature verification. This is accomplished by configuring the runtime to not provide System.Security.Policy.Publisher evidence for code access security. For more information about how to configure this option and which applications can use it, see the <generatePublisherEvidence> element.

Requirements

Namespace: System.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0