I have a Azure Web App which is integrated to a VPN that has S2S configured and working.
When I try to access file in a UNC path providing IP (\IP\path) I am getting error message "Access to the path 'xxx' is denied. I am trying to pull some files in the on-prem UNC path to load to Azure DB in a WebJob.
I am able to access on-premise services using http followed by IP address, also I am able to send SMTP messages using the IP address of the on-prem SMTP server.
Can someone help me figure out what could be the issue here OR is it not supported?
Thanks in advance for your help.
Please let me know if any additional information needed. Btw, I created a VM in the VNET and it can access the UNC path.
Update: Code to access the path is within an Impersonation logic where I am passing the domain user details that has access to the path. Forgot to mention it in the initial post.
The App Service sandbox explicitly does not allow access to the ports necessary for SMB protocol (137/138/139/445).
This article mentions it under Restricted Outgoing Ports: https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox.