The exception that is thrown when a denied host resource is detected.
Assembly: mscorlib (in mscorlib.dll)
A HostProtectionAttribute attribute is used to determine if a type or member can be loaded, based on the host’s protection preferences established when the common language runtime is started. If a type or member with an active HostProtectionAttribute is called, a link demand occurs for that protection attribute. If the caller does not meet the demand for host protection, a is thrown.
A HostProtectionAttribute is not a permission, even though it is the target of a link demand. Because a is thrown for a link demand, it cannot be handled, and therefore it cannot be trapped and processed in code.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.