因此,我实现了一个接口,使用
HttpClient
类发出请求。
代码可以在本地完美工作,但当我部署到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
web服务提供商声明“如果您使用防火墙或代理,您必须为我们的IP添加和例外。对于HTTPS,请使用端口443:
200.203.125.24
200.203.125.25
200.203.125.26
(异常消息的ip)
200.203.125.28
200.203.125.29"
我在Azure上到处寻找防火墙之类的东西,但一无所获。此外,这个异常消息相当隐秘。我用另一个url测试了相同的代码(在www.google.com上发布了一篇文章),结果成功了。
有什么想法吗?