Class NetworkAddressNotAllowedException
- Namespace
- NuvTools.Security.Network
- Assembly
- NuvTools.Security.dll
Thrown when an outbound connection would reach a host or an address that NetworkAddressPolicy denies.
public sealed class NetworkAddressNotAllowedException : IOException, ISerializable
- Inheritance
-
NetworkAddressNotAllowedException
- Implements
- Inherited Members
Remarks
Raised from a ConnectCallback, it reaches the caller of HttpClient as the inner exception of an HttpRequestException. The message names the host but not the address, so it is safe to log and still says which URL was refused; the address is on Address for whoever needs it.
Constructors
NetworkAddressNotAllowedException(string, IPAddress?)
Creates the exception.
public NetworkAddressNotAllowedException(string host, IPAddress? address)
Parameters
Properties
Address
The denied address, or null when the host name itself was refused.
public IPAddress? Address { get; }
Property Value
Host
The host that was asked for, as it appeared in the request.
public string Host { get; }