HostProtectionException Clase
Definición
Precaución
Code Access Security is not supported or honored by the runtime.
Excepción que se produce cuando se detecta un error de host denegado.The exception that is thrown when a denied host resource is detected.
public ref class HostProtectionException : SystemException
public class HostProtectionException : SystemException
[System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public class HostProtectionException : SystemException
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class HostProtectionException : SystemException
type HostProtectionException = class
inherit SystemException
[<System.Obsolete("Code Access Security is not supported or honored by the runtime.", DiagnosticId="SYSLIB0003", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type HostProtectionException = class
inherit SystemException
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type HostProtectionException = class
inherit SystemException
Public Class HostProtectionException
Inherits SystemException
- Herencia
- Atributos
Comentarios
Un HostProtectionAttribute atributo se utiliza para determinar si se puede cargar un tipo o miembro, en función de las preferencias de protección del host establecidas cuando se inicia el Common Language Runtime.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. Si se llama a un tipo o miembro con un activo HostProtectionAttribute , se produce una petición de vínculo para ese atributo de protección.If a type or member with an active HostProtectionAttribute is called, a link demand occurs for that protection attribute. Si el autor de la llamada no satisface la demanda de protección del host, HostProtectionException se produce una excepción.If the caller does not meet the demand for host protection, a HostProtectionException is thrown.
Nota
HostProtectionAttributeNo es un permiso, aunque es el destino de una petición de vínculo.A HostProtectionAttribute is not a permission, even though it is the target of a link demand. Dado HostProtectionException que se produce una excepción para una petición de vínculo, no se puede controlar y, por tanto, no se puede interceptar y procesar en el código.Because a HostProtectionException is thrown for a link demand, it cannot be handled, and therefore it cannot be trapped and processed in code.
Constructores
HostProtectionException() |
Inicializa una nueva instancia de la clase HostProtectionException con valores predeterminados.Initializes a new instance of the HostProtectionException class with default values. |
HostProtectionException(SerializationInfo, StreamingContext) |
Inicializa una nueva instancia de la clase HostProtectionException con la información de serialización y el contexto de secuencia especificados.Initializes a new instance of the HostProtectionException class using the provided serialization information and streaming context. |
HostProtectionException(String) |
Inicializa una nueva instancia de la clase HostProtectionException con el mensaje de error especificado.Initializes a new instance of the HostProtectionException class with a specified error message. |
HostProtectionException(String, Exception) |
Inicializa una nueva instancia de la clase HostProtectionException con el mensaje de error especificado y una referencia a la excepción interna que representa la causa de esta excepción.Initializes a new instance of the HostProtectionException class with a specified error message and a reference to the inner exception that is the cause of this exception. |
HostProtectionException(String, HostProtectionResource, HostProtectionResource) |
Inicializa una nueva instancia de la clase HostProtectionException con un mensaje de error especificado, los recursos del host protegido y los recursos del host que causaron la excepción que se va a producir.Initializes a new instance of the HostProtectionException class with a specified error message, the protected host resources, and the host resources that caused the exception to be thrown. |
Propiedades
Data |
Obtiene una colección de pares clave/valor que proporciona información definida por el usuario adicional sobre la excepción.Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Heredado de Exception) |
DemandedResources |
Obtiene o establece los recursos de protección de host solicitados que produjeron la excepción que se va a producir.Gets or sets the demanded host protection resources that caused the exception to be thrown. |
HelpLink |
Obtiene o establece un vínculo al archivo de ayuda asociado a esta excepción.Gets or sets a link to the help file associated with this exception. (Heredado de Exception) |
HResult |
Obtiene o establece HRESULT, un valor numérico codificado que se asigna a una excepción específica.Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Heredado de Exception) |
InnerException |
Obtiene la instancia Exception que produjo la excepción actual.Gets the Exception instance that caused the current exception. (Heredado de Exception) |
Message |
Obtiene un mensaje que describe la excepción actual.Gets a message that describes the current exception. (Heredado de Exception) |
ProtectedResources |
Obtiene o establece los recursos de protección de host que son inaccesibles al código de confianza parcial.Gets or sets the host protection resources that are inaccessible to partially trusted code. |
Source |
Devuelve o establece el nombre de la aplicación o del objeto que generó el error.Gets or sets the name of the application or the object that causes the error. (Heredado de Exception) |
StackTrace |
Obtiene una representación de cadena de los marcos inmediatos en la pila de llamadas.Gets a string representation of the immediate frames on the call stack. (Heredado de Exception) |
TargetSite |
Obtiene el método que produjo la excepción actual.Gets the method that throws the current exception. (Heredado de Exception) |
Métodos
Equals(Object) |
Determina si el objeto especificado es igual que el objeto actual.Determines whether the specified object is equal to the current object. (Heredado de Object) |
GetBaseException() |
Cuando se invalida en una clase derivada, devuelve la clase Exception que representa la causa principal de una o más excepciones posteriores.When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Heredado de Exception) |
GetHashCode() |
Sirve como la función hash predeterminada.Serves as the default hash function. (Heredado de Object) |
GetObjectData(SerializationInfo, StreamingContext) |
Establece el objeto SerializationInfo especificado con información sobre la excepción de protección de host.Sets the specified SerializationInfo object with information about the host protection exception. |
GetObjectData(SerializationInfo, StreamingContext) |
Cuando se invalida en una clase derivada, establece SerializationInfo con información sobre la excepción.When overridden in a derived class, sets the SerializationInfo with information about the exception. (Heredado de Exception) |
GetType() |
Obtiene el tipo de tiempo de ejecución de la instancia actual.Gets the runtime type of the current instance. (Heredado de Exception) |
MemberwiseClone() |
Crea una copia superficial del Object actual.Creates a shallow copy of the current Object. (Heredado de Object) |
ToString() |
Devuelve una representación de cadena de la excepción de protección de host actual.Returns a string representation of the current host protection exception. |
Eventos
SerializeObjectState |
Ocurre cuando una excepción se serializa para crear un objeto de estado de excepción que contenga datos serializados sobre la excepción.Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Heredado de Exception) |