How can I use "Azure File Storage" with Web App Service?
Asked Answered
S

2

29

I have been struggling to find some resources that help explain, how we use the File Storage with Web App Service.

There are ways to use it with the old Web Roles, Check here (Using the Azure File Service in your Cloud Services (Web and Worker Roles)).

However, there is NO OnStart() methods in "Azure Web Service".

Scrod answered 5/11, 2015 at 13:1 Comment(0)
M
18

If you're looking for mapping a drive to your Azure File Service share in your Web App using SMB 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/.

Matson answered 5/11, 2015 at 13:35 Comment(6)
I confirm that you cannot map a drive to File Service today. This could potentially happen in the future.Uria
That would be a great addition. I have a scenario where an embedded database is used with my asp.net mvc application and I want to persist its data on Azure Files, hence the need for a sort of drive. Anyway, Azure Files feel more natural than blob storage, if they can provide this functionality. Then, future development will "feel" as simple as traditional old-school development style.Scrod
Any update on this? I'm trying to do the same thing to enable a swift "Lift and Shift" of a legacy webforms application that right now had dedicated hosting on a VM and reads/writes images directly onto its C drive. So I'd like to be able to do it via a mapped drive. The REST APIs would not save me coding time. I found this article but its from 2014 and so far I'm getting access denied errors with it: blogs.msdn.microsoft.com/windowsazurestorage/2014/05/26/…Bearable
This feature has arrived. You can map a drive to an azure file share at this time.Ferocious
Feature documented there - learn.microsoft.com/en-us/azure/app-service/…Secundines
Now it can be used with simple Windows based web apps.. no need it to be a container.Kesterson
C
10

Yes, you can. In Linux Web Apps and Windows Containers Web Apps only.

In the Web App, under Application Settings you will find Mount storage (Preview) section where you can mount Storage account. Works like a charm.

Concuss answered 31/1, 2019 at 12:40 Comment(4)
Some elaboration or links might helpScrod
Seems the UI is only available for Linux based app services blogs.msdn.microsoft.com/appserviceteam/2018/09/24/…Blanding
Not available for windows web apps: Manage a web app's Azure storage account configurations. (Linux Web Apps and Windows Containers Web Apps Only)Blanding
I find it astonishing that this is still the case.Blakey

© 2022 - 2024 — McMap. All rights reserved.