azure功能无法访问本地网络

azure功能无法访问本地网络,azure,azure-functions,access-denied,vnet,Azure,Azure Functions,Access Denied,Vnet,我有一个azure触发器功能,我希望服务从本地的文件夹中获取文件,然后处理它们。该文件夹是我们只能通过VPN访问的。该服务对此具有VNET配置,但仍无法访问该文件夹 我该怎么办 请让我知道为什么会出现此错误,或者我是否需要在流程中更改某些内容?提前谢谢 尝试ping文件夹地址,出现此异常 System.Net.NetworkInformation.PingException: An exception occurred during a Ping request. ---> System.

我有一个azure触发器功能,我希望服务从本地的文件夹中获取文件,然后处理它们。该文件夹是我们只能通过VPN访问的。该服务对此具有VNET配置,但仍无法访问该文件夹

我该怎么办

请让我知道为什么会出现此错误,或者我是否需要在流程中更改某些内容?提前谢谢

尝试ping文件夹地址,出现此异常

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 ....
试图访问路径,但出现以下异常

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

您无法启动从Azure功能到on-prem的连接,网络连接只能由连接到专用端点的客户端启动,服务提供商(在本例中Azure功能)没有任何路由配置来启动到服务使用者的连接。只能在单个方向上建立连接

如果onprem文件夹是OneDrive文件夹,您可以选择使用Microsoft Graph API发送到webhook,webhook可能是您的函数应用程序。详情在这里


这只是一个选项,我对你的情况了解有限。

Hi@Ken,我错误地解释了我的情况,对此表示抱歉。Azure服务每隔5分钟从内部部署的文件夹中获取文件并对其进行处理。操作非常简单。据我所知,有一个VNet选项可以将虚拟网络连接到本地网络,反之亦然。我们已经为服务完成了此操作,但仍然无法访问on-prem网络没有问题。在您的评论中,您说Azure服务接收文件(我假设您所指的服务是Azure功能)。如果是这样,那么您正在尝试从Azure连接到OnPrem,这是不允许通过私有端点进行的。您需要找到一种方法将这些文件放到云上(OneDrive、通过AzCopy的Azure存储、Azure文件同步等),然后对它们进行处理。