
482
|
Chapter 23: The System.Web Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
AspNetHostingPermission
System.Web (system.dll)
.NET 1.1, serializable
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 authentica-
tion. 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.
Figure 23-2
. More System.Web types, including collections and exceptions
implementsextends
NameValueCollection
TextWriter
KEY
System.Collection.Specialized System.Web
Abstract ClassClass Interface
Sealed
Object
HttpClientCertificate
HttpException
HttpCookieCollection
HttpModuleCollection
HttpApplicationState
HttpFileCollection
System.Runtime.InteropServices
ExternalException ...