Share via


Azure Web App: Connect to your site via FTP and upload/download files

In this post I will describe on how to connect to an Azure Web App via FTP using FileZilla as a FTP client. The readers are free to choose their FTP client

 Download publishsettings file from Azure Portal:
  • Login to Azure portal: https://portal.azure.com
  • Click on App Services.
  • Select the Site and then click on Get publish profile.

downloadpublishsettings

  • Save the file and open it in notepad.exe.
  • The file contains 2 <publishProfile> sections. One is for Web Deploy and another for FTP
  • Under the <publishProfile> section for FTP make a note of the following values: 
    • publishUrl (hostname only)
    • userName -------------------------- > This is the information you are looking for 
    • userPWD

Below is a publishsettings file from one of my test sites.
Every file has unique username and password. The user could also reset the password, however that is beyond the scope of this post. I will discuss in another post altogether.

<publishData><publishProfile              profileName="kaushals - Web Deploy" publishMethod="MSDeploy"publishUrl="kaushals.scm.azurewebsites.net:443"msdeploySite="kaushals"userName="$kaushals"userPWD="nGc9c8RmmRtwqF8hx2Fg6n8osiczuo8sJaZ32C02ZnBMzS627uagERwHM4NE"destinationAppUrl="https://kaushals.azurewebsites.net"SQLServerDBConnectionString=""mySQLDBConnectionString=""hostingProviderForumLink=""controlPanelLink="https://windows.azure.com"><databases/></publishProfile><publishProfile              profileName="kaushals - FTP" publishMethod="FTP"publishUrl="ftp://waws-prod-db3-011.ftp.azurewebsites.windows.net/site/wwwroot"ftpPassiveMode="True"              userName="kaushals\$kaushals"userPWD="nGc9c8RmmRtwqF8hx2Fg6n8osiczuo8sJaZ32C02ZnBMzS627uagERwHM4NE"destinationAppUrl="https://kaushals.azurewebsites.net"SQLServerDBConnectionString=""mySQLDBConnectionString=""hostingProviderForumLink=""controlPanelLink="https://windows.azure.com"><databases/></publishProfile></publishData>

 NOTE: We need only the hostname (waws-prod-db3-011.ftp.azurewebsites.windows.net) from the FTP's publishURL section and not the complete path.

Connect using FileZilla:
  • Download and install FileZilla, Click here to download FileZilla.
  • Launch FileZilla.
  • Go to File Menu —>Site Manager.
  • Under Site Manager click on New Site button and give it a descriptive name.
  • Under the General tab set the values  for the following accordingly
    • Host: Paste the hostname from publishUrl obtained from the publishsettings file above.
    • Logon Type: set this to Normal.
    • User: Paste the userName obtained from the publishsettings file above.
    • Password: Paste the userPWD obtained from the publishsettings file above.
  • Click on Connect to connect to the site over FTP.
  • You would see two folder under the root: Logfiles and Site.
  • Logfiles folder as the name indicates provides storage for various logging options you see under the CONFIGURE management page on the Azure Portal.
  • Site folder is where the application resides. To be more specific the code resides here: /site/wwwroot

Thus, Azure Web Sites gives the user the flexibility to create/upload/download files/folder(s) to their corresponding site via FTP. HTH!

Comments

  • Anonymous
    January 18, 2015
    Question: I had posted a question on Azure Forum but it seems your post answered part of my question. social.msdn.microsoft.com/.../how-to-upload-videos-bigger-than-200mb-from-local-into-media-services-upload-tool Now that I was able to connect to my Azure configured site (a Joomla site) following your great helpful info. I recognize all the folders under "sites" folder. It's everything in my Joomla. But what are, where are the log files? Are those inside Azure server? because my goal is to upload videos files 200mb+ directly to my Azure Storage/container or Media Services acct. via FTP.

  • Anonymous
    January 19, 2015
    @kd90000 This post is specific to Azure Websites. the Logfiles folder are a collection of the logs (IIS logs, deployment logs, event logs, FREB etc) for your site.

  • Anonymous
    November 05, 2015
    Hi Kausal. Will I be able to move my WCF which uses the framework 3.0 using Filezilla? If not, what is the option for moving a Framework 3.0 WCF to Azure?

  • Anonymous
    November 13, 2015
    @fathima I would recommend you to use Visual Studio for such deployments. You could use FTP clients as well, but VS would be more suitable.

  • Anonymous
    December 30, 2015
    Hello Kaushal, I created successfully a WebApp on Microsoft Azure and then followed the above steps as you mentioned to use FTP. However the files Log files and sites does not appear.   On the left hand corner i got these info: Response: 530 User cannot log in. Error: Critical error: Could not connect to server Can you please guide me on this.

  • Anonymous
    July 03, 2016
    I want to know that can I move my WCF which uses the framework 3.0 using Filezilla?http://idioms.in/

  • Anonymous
    February 03, 2017
    I am getting Error at directory listing, what would be wrong?Retrieving directory listing...Command: PWDResponse: 257 "/" is current directory.Command: TYPE IResponse: 200 Type set to I.Command: PASVResponse: 227 Entering Passive Mode (13,84,39,73,39,246).Command: LISTResponse: 150 Opening BINARY mode data connection.Error: Connection timed out after 20 seconds of inactivityError: Failed to retrieve directory listing

    • Anonymous
      February 03, 2017
      using Encryption "Only use plain FTP(insecure) solved the problem
  • Anonymous
    July 07, 2017
    All works now.Thanks for sharing!

  • Anonymous
    August 16, 2017
    I have a problem that I followed every step and after connection established Connection established, waiting for welcome message...Error: Connection timed out after 20 seconds of inactivityError: Could not connect to serverthis msg is showing please help

  • Anonymous
    October 09, 2017
    All working fine, great article ! Thanks !