1

So, I have an app service hosted on azure and I want that app service to upload the files to my local server's shared folder. Local server has some software configured which processes those uploaded files.

In development environment everything works fine using UNC path for e.g. 10.197.1.65/Public/MyFolder/ and my application can copy the files over the network but I am not sure about how can I do that from app service.

I have encountered few solutions during my research like creating an ASE and VNET , Mapping of Azure Storage with my local drive etc., but I am not sure that which would be the feasible and proper approach.Thanks a lot.

  • you need to have an hybrid environment and have the app service on an ASE and make sure that your cloud resources can talk to the on premises ones. – Aravind Nov 22 '19 at 12:22

1 Answers1

1

You can't use UNC path from your app service due to that applications cannot connect to anywhere using ports 445, 137, 138, and 139 in the Restricted Outgoing Ports of Azure Web App sandbox.

As far as I know, the App service with VNet Integration is good to access or talk to the resource from a Virtual network or your on-premise network but you may need to deploy a site to site VPN gateway for your local environment. In this way, It does not support mounting a drive, but you can directly access the local data from your application.

For a Windows Container on App Service, It is a preview feature that you can mount an Azure Files share to a directory in your App Service app, then transfer data into Azure Files from your local machine. There are many methods you can interact with Azure file shares.

Nancy
  • 26,865
  • 3
  • 18
  • 34
  • Thanks @Nancy Xiong but VNet configuration is a paid service as far as I know. I am looking for a more feasible way. – Jaydev Solanki Dec 02 '19 at 03:52
  • You can [get files via ftp](https://github.com/projectkudu/kudu/wiki/Accessing-files-via-ftp). Try to FTP your app service then download the files, you could follow [this](https://medium.com/@michaelhenderson/how-to-download-your-source-code-from-azure-app-service-59c848752b0f) to do it. – Nancy Dec 02 '19 at 05:04
  • Is the reply helpful? – Nancy Dec 04 '19 at 11:18
  • Yes @Nancy Xiong , I have implemented the FTP access on remote server and feeding that to my application to upload the files. As far as I searched there is no way other than 'Paid Services' to connect internal network server and App Service. – Jaydev Solanki Dec 05 '19 at 12:06
  • Just to note, 445 is not blocked when running code as container on App Service. You cannot mount share via `mount` anyway as this requires SYS_ADMIN capability but 445 is not blocked from containers running on App Services. – kamilz Mar 29 '23 at 11:07