Execution permission is required for a SecurityPermission setting on all .NET applications and for any managed code that you want a user to run.
This table shows the required SecurityPermission settings for functions and objects in Windows Forms targets.
SecurityPermission required in Windows Forms targetsFunction, object, property, or feature |
Permission required |
OLEControl
|
Unrestricted (or the Full Trust option) |
ChangeDirectory, Handle, Post, Restart, Run, Send
|
UnmanagedCode |
URL (PictureHyperlink and StaticHyperlink property),
|
UnmanagedCode |
HyperlinkToURL (Inet property)
|
UnmanagedCode |
Language interoperation feature
|
Variable permissions required, depending on .NET function called or property accessed |
Win32 API feature
|
UnmanagedCode |
This table shows the required SecurityPermission settings for interactions with .NET or Win32 functions and properties in Web Forms targets.
SecurityPermission required in Web Forms targetsFeature |
Permission required
|
Language interoperation
|
Variable permissions required, depending on .NET function called or property accessed |
Win32 API
|
UnmanagedCode |
Example 1
This example sets required security permissions for Windows Forms targets:
<IPermission class="System.Security.Permissions.SecurityPermission,
mscorlib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" version="1"
Flags="Assertion, Execution, BindingRedirects,
UnmanagedCode" />
Example 2
This example sets required security permissions for Web Forms targets
<IPermission class="SecurityPermission" version="1"
Flags="Assertion, Execution, ControlThread,
ControlPrincipal, RemotingConfiguration,
UnmanagedCode"/>