-1

I am currently working with a Java console application on a Windows server that has mounted an Azure File Share. I can't use the SDK of Azure Storage on that case because I use a framework this can only treat local files(and I can not change that.). At this point everything is working perfectly.

The client wants now to move the application to an Azure Function. The problem is that I don't see any way to mount the Azure File Share in an Azure Function. I've also tried Azure Web App but as I've seen so far there are not many options for Java.

What would be the best way to do that?

Thanks in advance for your help.

Francesc Arolas
  • 325
  • 1
  • 12

2 Answers2

1

According to my research, we cannot mount Azure file share in Azure Function or Azure web app. Because Azure app service cannot connect to anywhere using ports 445, 137, 138, and 139. However, if you want to mount Azure File share, you need to open port 445. For more details, please refer to the Accessing Azure File Storage from Azure Function and the document. enter image description here

So if you want to manage Azure File share in Azure Function, you need to Azure Storage SDK to manage it.

Besides, if you just want to mount Azure File share in Azure service, I suggest you use the Azure VM. Once you mount Azure file share on Azure VM, you can manage it like local file system.

Jim Xu
  • 21,610
  • 2
  • 19
  • 39
0

After a lot of work I found out myself the best way to do it.

I've an Azure Web App running on a linux server with Tomcat 9.0, which has the option to mount azure storage in it, then(because it doesn't allow web jobs) I run a new Thread when the server starts with the api.

It works like a charm.

Francesc Arolas
  • 325
  • 1
  • 12