0
votes

I have two app services. In both the app services I have a common folder that needs to be accessed. For example, lets assume that in the first app service I am adding a business and it stores in the location D:\home\site\wwwroot\business. From the second app service I would need to access the files in D:\home\site\wwwroot\business of the first app service. Appreciate the help in advance.

2
What exactly do u need? I'm assuming that you need to store files and share it between application. There's already the Storage Account to store files. Don't save Files on the server, they are volatile on Azure.Fals
@Fals - What "server" are you referring to? Web App storage is durable (unless you actually delete the web app altogether). It's not the same as a temp disk on a VM.David Makogon
@Fals i have deployed my two web applications in two 'App Service' of azure.Both have their own storage spaces. I have place them in the same resource group though.Srikkanth Sreeram
@DavidMakogon VMs without assigned storage are volatile.Fals
@Fals - I really don't understand what you're referring to: a VM's OS Disk is durable. Any attached data disks are durable. Even if you destroy the VM, the disks remain until deleted (and remain durable). The same goes for both standard and premium disks. Only the "temp" drive (which is ephemeral, in-chassis) is volatile. Further: Web Apps don't reside on VMs - they are a separately managed service, with nothing to do with VMs.David Makogon

2 Answers

2
votes

Each web app gets its own storage space, shared between instances of the web app.

webapp1.azurewebsites.net has no access to the d:\home\site\... storage used by webapp2.azurewebsites.net.

If you want to share storage between web apps, and assuming you're not talking about a database, you'd need to either:

  • use Azure Storage blobs
  • use an Azure File store (via api; web apps don't let you mount file shares)

You could always use a vm (with attached disks, which are durable) to share storage as well, but that has its own issues (e.g. if the VM with attached storage goes down for any reason, so does your shared storage).

EDIT You can also consider using something like the Redis service to cache content (if it fits within a key/value store paradigm), which would then be available to all of your web apps, as needed.

0
votes

As david said each app has its own storage and regarding your needs you should probably consider a storage option, blob or file.

However you can also set your two web apps on a same virtual network and share a folder through that network.

For more informations you should check Microsoft documentation on Integrate your app with an Azure Virtual Network