Mount the Azure storage account (file share) and linking the virtual directory to the Azure Web App

Sagar S 1 Reputation point
2024-02-19T20:07:11.2866667+00:00

Its a Java based app which has local database Derby (flat file based) that is listening on the particular port. Application functions correctly and works as expected. Within the site’s root folder C:\home\site\server\history>   there are multiple folders, subfolders and files. And these folders hold templates which are visible in the front-end portal. See the below structure of the site folder observed from Kudu console

User's image

What we want to do is move all the folder/files from the history folder mentioned above to the storage account’s file share. Storage account has private endpoint and in the same vnet as the above web app and in the same region. In the web app, mounted the storage account and pointed to the storage account’s file share and linked to the virtual directory (see the screen shot below). User's image

User's image

My assumption is, doing this setup, web app will read/write the templates from/to the history folder from the storage account’s file share and we don’t have to maintain the history folder that grows which is present under the C:\home\site\server\history. I tried the above setup but no luck. The template from the storage account don’t populate. Is the above setup valid and viable? cc @VenkateshDodda-MSFT

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,719 questions
Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
209 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,933 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 18,451 Reputation points Microsoft Employee
    2024-02-21T06:49:54.16+00:00

    @Sagar S Thanks for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.

    Based on the shared information, I understand that you have mounted a storage account to App service and your app service has to access the files that are stored in it.

    If my understanding is correct, you can refer to the answer provided by @Lex Li (Microsoft) in this similar thread here to use the FastApi to serve/access those static files.

    0 comments No comments