App Service with Azure Files mount as local share, using private connectivity. Did you know?
You are working on an Azure infrastructure that must implement private connectivity.
You create an App Service that needs a Azure Files mounted as local share. Both App Service and Storage account use private connectivity only.
App Service’s virtual network integration is active, so the app can access resources in your virtual network. Inbound private access to the app and to the storage account is granted through private endpoints.
You already configured the fileshare mount on App Service, but the app is unable to read from the fileshare.
Why?
The reasons could be many, but one important thing to know is the following: with virtual network integration on your app, the mounted drive uses an RFC1918 IP address and not an IP address from your virtual network. In order to enable routing through your virtual network you have to set the following app setting in App Service’s environment variables:
WEBSITE_CONTENTOVERVNET = 1
Sources: