DekGenius.com
[ Team LiB ] Previous Section Next Section

AspNetHostingPermission.NET 1.1, serializable

System.Web (system.dll)sealed class

With this class, you can ensure that the current assembly has the required code access security permission to host the ASP.NET engine. If you call Demand( ) and the assembly does not have the required permission, a System.Security.SecurityException will be thrown immediately (which prevents the problem of an unexpected security-related failure later on). You can also use the Deny( ) method to programmatically revoke this permission.

Note that this class only pertains to code access security (the policy of allowed and disallowed actions configured using the .NET Framework Configuration Tool or the caspol.exe command-line utility). It has nothing to do with ASP.NET or IIS authentication. It will also not be of any interest if you are using IIS the host the ASP.NET engine.

This type was added in .NET 1.1.

public sealed class AspNetHostingPermission : System.Security.CodeAccessPermission, 
       System.Security.Permissions.IUnrestrictedPermission {
// Public Constructors
   public AspNetHostingPermission(AspNetHostingPermissionLevel level);
   public AspNetHostingPermission(System.Security.Permissions.PermissionState state);
// Public Instance Properties
   public AspNetHostingPermissionLevel Level{set; get; }
// Public Instance Methods
   public override IPermission Copy( );              // overrides CodeAccessPermission
   public override void FromXml(System.Security.SecurityElement securityElement);// overrides CodeAccessPermission
   public override IPermission Intersect(System.Security.IPermissiontarget);// overrides CodeAccessPermission
   public override bool IsSubsetOf(System.Security.IPermission target);// overrides CodeAccessPermission 
   public bool IsUnrestricted( );                    // implements IUnrestrictedPermission
   public override SecurityElement ToXml( );         // overrides CodeAccessPermission
 public override IPermission Union(System.Security.IPermission target);// overrides CodeAccessPermission
}

Hierarchy

System.Object System.Security.CodeAccessPermission(System.Security.IPermission, System.Security.ISecurityEncodable, System.Security.IStackWalk) AspNetHostingPermission(System.Security.Permissions.IUnrestrictedPermission)

    [ Team LiB ] Previous Section Next Section