0

I have an azure trigger function and I want the service to take the files from folder which is in on-premise then process them. The folder is that we only can access via VPN. The service has a VNET configuration for this but still cannot access the folder.

What should I do?

Please let me know why I am getting this error or do I need to change something in my process? Thanks in advance.

tried to ping the folder address, got this exception

System.Net.NetworkInformation.PingException: An exception occurred during a Ping request. ---> System.ComponentModel.Win32Exception (5): Access is denied. at System.Net.NetworkInformation.Ping.InitialiseIcmpHandle() at System.Net.NetworkInformation.Ping.DoSendPingCore(IPAddress address, Byte[] buffer, Int32 timeout, PingOptions options, Boolean isAsync) at System.Net.NetworkInformation.Ping.Send(IPAddress address, Int32 timeout, Byte[] buffer, PingOptions options) --- End of inner exception stack trace --- at System.Net.NetworkInformation.Ping.Send(IPAddress address, Int32 timeout, Byte[] buffer, PingOptions options) at System.Net.NetworkInformation.Ping.Send(String hostNameOrAddress, Int32 timeout, Byte[] buffer, PingOptions options) at ....

tried to access to the path, got the exception below

System.UnauthorizedAccessException: Access to the path '\\\xxxxxx\test' is denied. at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) at System.IO.Enumeration.FileSystemEnumerator`1.Init() at ....

1 Answers1

0

You cannot initiate the connection from Azure Functions to on-prem, network connections can only be initiated by clients connecting to the Private endpoint, Service providers (in this case Azure Functions) do not have any routing configuration to initiate connections into service consumers. Connections can only be establish in a single direction.

If the onprem folder is a OneDrive folder you have the option of using the Microsoft Graph API to send to a webhook which could be your Function App. Details are here.

https://learn.microsoft.com/en-us/graph/webhooks

This is only one option with the limited information I have on your scenario.

Ken W - Zero Networks
  • 3,533
  • 1
  • 13
  • 18
  • Hi @Ken, I wrong explained my case sorry about that. Every 5 mins, the Azure service takes the files from folder which is in the on-premise and process them. It’s quite simple operation. As far as I understood there is a VNet option to connect virtual network to on-premise network or vice-versa. We have done it for the service but still cannot access the on-prem network – Ahmet Faruk Aygün Apr 12 '21 at 19:46
  • No problem. In your comment you say the Azure Service takes the files (I assume the service you are referring to is Azure Functions). If so, then you are attempting to connect from Azure to OnPrem which is not allowed via Private endpoint. You need to find a way to get these files to the cloud (OneDrive, Azure Storage via AzCopy, Azure File Sync, etc), then process them. – Ken W - Zero Networks Apr 14 '21 at 12:32
  • I reject this answer. Everything in the documentation suggests this is possible. Please provide references to your claims. – Appleoddity Dec 13 '22 at 19:06