[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Specifies whether the runtime uses legacy code access security (CAS) policy.
<configuration> Element <runtime> Element <NetFx40_LegacySecurityPolicy> Element
< NetFx40_LegacySecurityPolicy
enabled="true|false"/>
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 | The runtime does not use legacy CAS policy. This is the default. |
true | The runtime 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. |
In the .NET Framework version 3.5 and earlier versions, CAS policy is always in effect. In the .NET Framework version 4 Beta 2, CAS policy must be enabled.
CAS policy is version-specific. Custom CAS policies that exist in earlier versions of the .NET Framework must be respecified in the .NET Framework 4 Beta 2.
Note |
|---|
If you specify a target .NET Framework version that is earlier than the .NET Framework 4 Beta 2 in the Applications tab for your Visual Studio project, CAS policy will be enabled, including any custom CAS policies you specified for that version. However, you will not be able to use new .NET Framework 4 Beta 2 types and members. You can also specify an earlier version of the .NET Framework by using the <supportedRuntime> element in the startup settings schema. |
Configuration File
This element can be used only in the application configuration file.
The following example shows how to enable legacy CAS policy for an application.
<configuration>
<runtime>
< NetFx40_LegacySecurityPolicy enabled="true"/>
</runtime>
</configuration>
Reference
Other Resources