1
因此,我實現了一個接口,使用HttpClient
類與其他Web服務進行通信以發出請求。Azure連接失敗,因爲連接的主機未能響應ip:443
的代碼工作完全在本地,但是當我部署到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.27
200.203.125.28
200.203.125.29"
我在Azure中四處尋找防火牆什麼的,我什麼都沒有。此外這個異常消息是非常cryptc。我用另一個網址(向www.gooogle.com發佈了一篇文章)測試了相同的代碼,結果很有效。
任何想法?