none
Can a WebApp hosted in Azure App Service mount a drive for file access?

    Question

  • Hello folks,

    I have a WebApp hosted in Azure App Service. I would like to use the Azure File Share to write log files (1 of the use cases). I would later expand this to store files uploaded by the users in that share as well. Can we use Azure App Service to access the file share or do I have to migrate my webApp to cloud service/VM? In other words, can we mount the device (let's say Z:) and then use Z:\logsDir\log.txt in our code in App Service or does App Service not allow the device to be mounted?

    Friday, March 18, 2016 4:15 AM

All replies

  • Hi Mohsin,

    You can't do that via webApp. You can use Azure File Service REST API or .net Storage Client Library for manipulate files and share it.

    You can see this link where explain how use storage client library:

    :https://azure.microsoft.com/en-in/documentation/articles/storage-dotnet-how-to-use-files


    protocol, then I don't think you can do as of today.

    What you could do is make use of Azure File Service REST API and manipulate shares and files that way. You don't have to actually use the REST API per se; you can simply use the latest version of .Net Storage Client library which is a wrapper over REST API.

    Please see this link for more details on how to use this using Storage Client library:https://azure.microsoft.com/en-in/documentation/articles/storage-dotnet-how-to-use-files/.

    Friday, March 18, 2016 7:42 AM
  • Not at the moment Mohsin, as Robert mentioned above you'd need to instead use REST API.
    Friday, March 18, 2016 9:54 PM