【发布时间】:2017-02-03 10:18:59
【问题描述】:
所以我实现了一个接口来与使用 HttpClient 类发出请求的 REST Web 服务进行通信。
代码在本地完美运行,但是当我部署到 Azure 时,我的应用程序无法触发请求,它在这一行崩溃:
using (var response = await HttpClient.PostAsync(uri, content)) { ... }
// uri = https://api-rest.zenvia360.com.br/services/send-sms
确切的异常消息是这样的:
A connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond 200.203.125.26:443
网络服务提供商声明“如果您使用防火墙或代理,您必须为我们的 IP 添加和例外。对于 HTTPS,请使用端口 443:
200.203.125.24
200.203.125.25
200.203.125.26(异常信息的ip)
200.203.125.27
200.203.125.28
200.203.125.29"
我在 Azure 中到处寻找防火墙或其他东西,但一无所获。此外,此异常消息非常隐秘。我用另一个 url 测试了相同的代码(向 www.gooogle.com 发了一个帖子),它工作了。
有什么想法吗?
【问题讨论】:
标签: c# web-services azure