System.Security.SecurityManager.GetStandardSandbox Method

Gets a permission set that is safe to grant to an application that has the provided evidence.

Syntax

public static PermissionSet GetStandardSandbox (System.Security.Policy.Evidence evidence)

Parameters

evidence
The host evidence to match to a permission set.

Returns

A permission set that can be used as a grant set for the application that has the provided evidence.

Remarks

Note:

In the net_v40_long, the host evidence in evidence must contain System.Security.Policy.Zone evidence.

The following table shows the permission sets that are returned for each zone.

SecurityZone.MyComputer

FullTrust

SecurityZone.Intranet

LocalIntranet

SecurityZone.Trusted

Internet

SecurityZone.Internet

Internet

SecurityZone.Untrusted

None

SecurityZone.NoZone

None

Other evidence, such as System.Security.Policy.Url or System.Security.Policy.Site, may be considered.

The returned permission set can be used by a sandbox to run the application. Note that this method does not specify policy, but helps a host to determine whether the permission set requested by an application is reasonable. This method can be used to map a zone to a sandbox.

Requirements

Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0