[英]Azure Web App For Containers - Container cannot connect to outside WCF Service
I have a windows container as Azure Web App, it has a connection to a WCF Service outside the container, when i test the functionality of the container locally it works, but not in Azure.
我在容器內的應用程序中有一個日志文件。 它說:無法解析遠程名稱:'XXXXXX.azurewebsites.net' <- 這是 WCF 服務
我努力了:
有任何想法嗎?
謝謝您的幫助!
要在 Windows 容器應用程序中設置公共 DNS 服務器,可以運行以下命令:
$nic = Get-NetAdapter
Set-DnsClientServerAddress -InterfaceIndex $nic.IfIndex -ServerAddresses ('8.8.8.8')
有關更多詳細信息,您可以閱讀Private DNS for Native Windows Docker Container 。
感謝@Nancy Xiong的幫助,您的回答是解決方案的一部分,我發現我需要在 windows 容器內的應用程序上應用延遲。 我不知道為什么,但是當應用程序啟動時容器沒有網絡通信。
在這個答案中, @Robbie Zhang說這是 Windows Server Core 2016 基本容器的 ACI 錯誤。
我猜 Azure App Service For Containers 在 Windows Server Core 2019 基礎容器中存在同樣的問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.