FTP/FTPS not working in Docker window container in Azure App Service

ronkit 31 Reputation points


I am hosting docker in windows container using Azure App Service.

Trying to FTP into an external remote server from docker.

Everything works fine in local pc, it does not work when deployed to Azure App Service.

System.TimeoutException: Timed out trying to connect! at FluentFTP.FtpSocketStream.Connect(String host, Int32 port, FtpIpVersion ipVersions) at FluentFTP.FtpClient.Connect(FtpSocketStream stream) at FluentFTP.FtpClient.Connect() at  

Am using FluentFtp to do it as for now

   FtpClient client = new FtpClient("waws-prod-sg1-067.ftp.azurewebsites.windows.net", 21, @"test", "test");  
                client.EncryptionMode = FtpEncryptionMode.Auto;  
                client.DataConnectionEncryption = true;  
                client.ValidateAnyCertificate = true;  
                client.SslProtocols = SslProtocols.Tls12;  
                client.DataConnectionType = FtpDataConnectionType.EPSV;  
                await client.UploadBytesAsync(content, "test.xlsx");  

Anyone can help or advise on this? Not much resource can be found online.


Azure App Services
Azure App Services
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,555 questions
Microsoft Technologies based on the .NET software framework.
869 questions
No comments
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 7,346 Reputation points Microsoft Employee

    @ronkit Thank you for reaching out to Microsoft Q&A. Can you try connecting to your container using any other FTP clients like (FileZilla, WinSCP, etc) and also, I hope you are using app level credentials while connecting to the webapp container.

    Make sure FTP is enabled on your app service. If it is disabled state, I would suggest you enable it by following these documentation steps

    Feel Free to reach back to me if you have any further questions on this.

0 additional answers

Sort by: Most helpful