【发布时间】:2017-11-15 21:45:15
【问题描述】:
我正在编写一个 Azure 函数来 ping 特定主机以使用 System.Net.NetworkInformation.Ping 类检查响应时间。调用 Ping.Send 时出现一般异常,但这在本地运行良好。
从 Azure Functions 出站的网络调用是否有限制?
我得到的例外很简单:
无法 ping:Ping 请求期间发生异常。
在 System.Net.NetworkInformation.Ping.Send(IP 地址地址,Int32 超时,字节 [] 缓冲区,PingOptions 选项) 在 System.Net.NetworkInformation.Ping.Send(String hostNameOrAddress, Int32 timeout, Byte[] buffer, PingOptions options
【问题讨论】:
-
听起来像 sandbox - "通过 Internet 访问应用程序的唯一方法是通过已经公开的 HTTP (80) 和 HTTPS (443) TCP 端口;应用程序可能不要在其他端口上侦听来自 Internet 的数据包。”