Gets a permission set that is safe to grant to an application that has the provided evidence.
Assembly: mscorlib (in mscorlib.dll)
- Type: System.Security.Policy::Evidence
The host evidence to match to a permission set.
Return ValueType: System.Security::PermissionSet
A permission set that can be used as a grant set for the application that has the provided evidence.
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.
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.
The following example shows how to use the method to obtain the permission set for a sandboxed application. For more information about running an application in a sandbox, see How to: Run Partially Trusted Code in a Sandbox.
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.