It is easy to deploy your web app or a website to Azure app service by using multiple tools. The integration is easy and straightforward with Visual Studio or similar tools to upload your source codes to Azure app service. But, how about downloading the source code from Azure to your computer? As an Azure admin, recently, I need to download the source code of one of our web apps.
This app was developed and implemented by a different vendor than the current partner who is maintaining the app. They want to see the source code and all repository related to this web app. So, I had to find a way to download it. Let me show how to download source code from Azure app service in this post.
Requierments
- A FTP client (Like Filezilla)
- The proper Azure access to get FTP details.
Steps to Download Source Code from Azure App Service
1) Log in to Azure management portal. Make sure you have the proper access for the account subscription and resource group where the app/website hosted.
2) Locate the app and download the ‘Get publish profile’. You will find this at the Overview pane. This file will contain few connection strings and settings, including FTP. We will look for certain FTP details from this file that can be used to connect this App service to download source codes.
3) Look for the publishURL, userName and userPWD of FTP settings. It is better to know whether an FTP connection is in Active or Passive mode.
4) After finding these details from the downloaded file, create a new connection or Quickconnect in FileZilla FTP.
5) Enter the DNS hostname without “” or FTP front of it, something like below.
waws-prod-am18-183.ftp.azurewebsites.windows.net
The user name will be similar to Username\$Username and a long password.
6) Once you clicked connect, it should access the Azure App service folders without any issues.
Based on the type of app/website hosted, you will find the source codes in different locations. You may find the repository and required files in different locations if you are hosing Web apps, mobile apps, Logic apps or API apps by using Azure Apps services. But these FTP credentials will work for all apps.
In this example, I found my backend web app under wwwroot folder. Mostly website files also will be under this folder.
7) This must be the source code you were looking for to download from Azure. Click the folder and click Download. I hope you would have created folder or selected the correct path on your local computer to download these files.
8) Once the entire folder downloaded you can go through these files and folders to find the source code of the app that is running on Azure.
I hope these steps are useful to you. It is always better to download and keep the source code with you for further developments, code validity check and even as a backup of your web app/website.