Επεξεργασία

Κοινή χρήση μέσω


HostSecurityPolicyResults Enum

Definition

Specifies the type of security policy to apply to an assembly.

public enum class HostSecurityPolicyResults
public enum HostSecurityPolicyResults
type HostSecurityPolicyResults = 
Public Enum HostSecurityPolicyResults
Inheritance
HostSecurityPolicyResults

Fields

Name Value Description
DefaultPolicy 0

Indicates that ASP.NET should use default logic to determine the appropriate permissions set for the specified assembly. You should return the DefaultPolicy value if you do not you want to decide the permission set for the assembly.

FullTrust 1

Indicates that the specified assembly should be granted full trust.

AppDomainTrust 2

Indicates that the permission set that is associated with the AppDomain instance should be applied to the specified assembly. This means that the assembly should be treated as a user assembly that is loaded into the partial-trust ASP.NET AppDomain instance. In addition, the assembly should have the permission set that was assigned to the AppDomain instance at initialization.

Nothing 3

Indicates that the permission set for the specified assembly is set to empty. An empty permission set is a new instance of the PermissionSet class, with a parameter value of None passed to the constructor. An assembly that is associated with an empty permission set will not load in an ASP.NET partial trust application domain. Therefore, you can use the Nothing field to prevent an assembly from loading into a partial trust ASP.NET application domain.

Remarks

The HostSecurityPolicyResults class is used to supply the return value for the ResolvePolicy method. Use this method if you want to customize ASP.NET run-time behavior to override the ASP.NET code access security policy. The enumeration value that is returned by the method indicates the type of security policy to use.

Applies to

See also