How can I use “Azure File Storage” with Web App Service?

江枫思渺然 提交于 2019-11-27 15:44:17

问题


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".


回答1:


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/.




回答2:


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.



来源:https://stackoverflow.com/questions/33545250/how-can-i-use-azure-file-storage-with-web-app-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!