<legacyV1CASPolicy> Element

Specifies whether the runtime uses legacy code access security (CAS) policy.

<configuration> Element
  <runtime> Element
    <legacyV1CASPolicy> Element

<legacyV1CASPolicy  
   enabled="true|false"/>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

enabled

Required attribute.

Specifies whether the runtime uses legacy CAS policy.

Enabled Attribute

Value

Description

false

Does not use legacy CAS policy. This is the default.

true

Uses legacy CAS policy.

Child Elements

None.

Parent Elements

Element

Description

configuration

The root element in every configuration file used by the common language runtime and .NET Framework applications.

runtime

Contains information about runtime initialization options.

Remarks

In the .NET Framework versions 1.0 and 1.1, identity permissions could not have an Unrestricted state. In the .NET Framework version 2.0, identity permissions can be Unrestricted. Use this element in the configuration file for an application to specify the legacy CAS behavior for identity permissions. You can specify the legacy CAS behavior for all applications on a computer by setting the environment variable COMPLUS_LegacyV1CASPolicy to 1.

Configuration File

This element can be used only in the application configuration file.

Example

The following example shows how to enable legacy CAS policy for an application.

<configuration>
   <runtime>
      <legacyV1CASPolicy enabled="true"/>
   </runtime>
</configuration>

See Also

Reference

Runtime Settings Schema

Other Resources

Configuration File Schema for the .NET Framework