BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 System.Enum System.Runtime.InteropServices.ComVisible(true)

The following table describes the time that each security action takes place and the targets that it supports.

In the net_v40_long, runtime support has been removed for enforcing the , , , and permission requests. These requests should not be used in code that is based on net_v40_short or later. For more information about this and other changes, see Security Changes in the .NET Framework Version 4.0.

You should not use in the net_v40_short. Instead, use the to restrict usage to fully trusted applications, or use to restrict partially trusted callers.

Declaration of security action

Time of action

Targets supported

LinkDemand (do not use in the net_v40_short)

Just-in-time compilation

Class, method

InheritanceDemand

Load time

Class, method

Demand

Run time

Class, method

Assert

Run time

Class, method

Deny (obsolete in the net_v40_short)

Run time

Class, method

PermitOnly

Run time

Class, method

RequestMinimum (obsolete in the net_v40_short)

Grant time

Assembly

RequestOptional (obsolete in the net_v40_short)

Grant time

Assembly

RequestRefuse (obsolete in the net_v40_short)

Grant time

Assembly

For additional information about attribute targets, see .

Specifies the security actions that can be performed using declarative security.

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.Permissions.SecurityAction Assert To be added.

  The calling code can access the resource identified by the current permission object, even if callers higher in the stack have not been granted permission to access the resource (see [<topic://cpconassert>]).

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.Permissions.SecurityAction Demand To be added.

  All callers higher in the call stack are required to have been granted the permission specified by the current permission object (see [<topic://cpconmakingsecuritydemands>]).

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("This requests should not be used")
  System.Security.Permissions.SecurityAction Deny To be added.

  The ability to access the resource specified by the current permission object is denied to callers, even if they have been granted permission to access it (see [<topic://cpcondeny>]).

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.Permissions.SecurityAction InheritanceDemand To be added.

  The derived class inheriting the class or overriding a method is required to have been granted the specified permission. For more information, see Inheritance Demands.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.Permissions.SecurityAction LinkDemand To be added.

  The immediate caller is required to have been granted the specified permission. Do not use in the net_v40_short. For full trust, use instead; for partial trust, use .

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Security.Permissions.SecurityAction PermitOnly To be added.

  Only the resources specified by this permission object can be accessed, even if the code has been granted permission to access other resources (see [<topic://cpconpermitonly>]).

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("This requests should not be used")
  System.Security.Permissions.SecurityAction RequestMinimum To be added.

  The request for the minimum permissions required for code to run. This action can only be used within the scope of the assembly.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("This requests should not be used")
  System.Security.Permissions.SecurityAction RequestOptional To be added.

  The request for additional permissions that are optional (not required to run). This request implicitly refuses all other permissions not specifically requested. This action can only be used within the scope of the assembly.

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("This requests should not be used")
  System.Security.Permissions.SecurityAction RequestRefuse To be added.

  The request that permissions that might be misused will not be granted to the calling code. This action can only be used within the scope of the assembly.

  0
0