Microsoft Azure – Working with Files in Azure App Service
Azure App Service is an HTTP-based service for hosting web applications, REST APIs, and mobile back ends. In this article, we will look into the process of working with files in the Azure App service using an example.
Console Access to my App Services:
- We can go to the Azure Portal and select my App Services and click on the console under Development Tools to have a command prompt to quickly work with my Azure App Service.
- As you can tell from the screenshot, we can start in D:\home\site\wwwroot. I can type dir to see a current directory listing.
- We can do basic commands here and even use type <filename> to parse the output of a file to the screen. You can make the directory and so forth, but keep in mind that this is a sandbox environment and some commands which require elevated permissions may not work. Quick Tip You can type help from the console window for a list of available commands. A VS Code experience to our App Service:
- There is also another option that is called “App Service Editor” located just two items down from the “Console” that you picked before. If you’re familiar with VS Code, then you’ll be right at home as you can explore, search and add to Git. You can also manipulate files from within the window. This makes it easy to add, edit or delete files.
- Just like in VS Code, you can modify your settings and even change your theme.
- No App Service tutorial is complete without mentioning Kudu Diagnostic Console. You can access it from within the App Service Editor under your app name -> Open Kudu Console or through the portal under Advanced Tools.
You can just click on the folder name to navigate or type in the command. You can also easily manipulate the files, but we like the App Service Editor better for that functionality. The main reason that we typically come to the Kudu Diagnostic Console is to download files.