Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

HostSecurityPolicyResults Enumeration

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

Namespace:  System.Web.Hosting
Assembly:  System.Web (in System.Web.dll)
'Declaration
Public Enumeration HostSecurityPolicyResults
Member nameDescription
AppDomainTrustIndicates 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.
DefaultPolicyIndicates 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.
FullTrustIndicates that the specified assembly should be granted full trust.
NothingIndicates 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.

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.

.NET Framework

Supported in: 4.5.1, 4.5, 4

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.