我创建了一个 Windows WCF 服务,我想将它托管在 Azure VM 中。
该服务在 VM 内本地运行良好,但是当尝试访问 VM 外部的服务时,我无法连接到指定端口的服务。
在请求服务时,我收到以下错误:
SocketException (0x274d): No connection could be made because the target machine actively refused it...
此外,在使用公共 ip 通过命令提示符 ping 虚拟机时,我得到Request timed out
.
我在 Azure 入站规则和 VM 防火墙入站规则中启用了 TCP 端口。虚拟机是 Windows Server。
如何从另一个系统访问在 VM 中运行的服务?
任何帮助表示赞赏。