Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

SecurityManager.GetStandardSandbox(Evidence) Method

Definition

Namespace:
System.Security
Assembly:
System.Security.Permissions.dll
Assembly:
mscorlib.dll
Package:
System.Security.Permissions v11.0.0-preview.5.26302.115
Source:
SecurityManager.cs
Source:
SecurityManager.cs
Source:
SecurityManager.cs
Source:
SecurityManager.cs
Source:
SecurityManager.cs
Source:
SecurityManager.cs
Source:
SecurityManager.cs
Source:
SecurityManager.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

public:
 static System::Security::PermissionSet ^ GetStandardSandbox(System::Security::Policy::Evidence ^ evidence);
public static System.Security.PermissionSet GetStandardSandbox(System.Security.Policy.Evidence evidence);
static member GetStandardSandbox : System.Security.Policy.Evidence -> System.Security.PermissionSet
Public Shared Function GetStandardSandbox (evidence As Evidence) As PermissionSet

Parameters

evidence
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.

Exceptions

evidence is null.

Remarks

Note

In the .NET Framework 4, 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.

Zone Permission set
MyComputer FullTrust
Intranet LocalIntranet
Trusted Internet
Internet Internet
Untrusted None
NoZone None

Other evidence, such as Url or 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.

Applies to


Feedback

Was this page helpful?