Error code 3 when testing connection between App Service and Storage File service

Ade Ade-Hall 5 Reputation points
2023-02-01T16:13:59.4366667+00:00

App service web job application is coded to access to an Azure file share folder via a UNC path e.g. \azurestorageaccountname.file.core.windows.net\foldername. Application is getting the error "Access to the path is denied".

App service is on the same Vnet as the storage account and both subnets are using the same Network security group (NSG) rule. Identical Inbound and Outbound rules have been added for ports 443 and 445. I am getting an OK (TCP level) for port 443 when I test connectivity using the network/connectivity trouble shooter diagnostic tools in the App service, and an errorcode:3 for 445 as shown in attached screenshot. I have tried disassociating the NSG from both subnets and get the same result. Diagnostics data for both the NSG rule and Vnet show allowed records for 445.

Does anyone know what this error code means or how to resolve this issue?
Screenshot 2023-02-01 155120

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,950 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ade Ade-Hall 5 Reputation points
    2023-02-06T13:24:14.4+00:00

    Read through Configure Azure Storage firewalls and virtual networks as part of checking and verify the virtual network and firewall rules were configured properly on the storage account. I was able to access storage account file share via UNC path from on-prem network and could connect to storage account via https from App service slot, but not access via UNC path from App service slot. On capturing NSG and App service diagnostic logs and examining the outputs, I could not see any indication of outbound network traffic from the App Service slot to the storage account via the virtual network integration feature, and on reading though App Service networking features, I came across this section and have concluded that this probably applies to outbound connections as well:

    User's image

    I have got round the issue by mounting the storage account file share in the App Service slot (Configuration->Path mappings) and then the files can be accessed via a UNC path to the local path c:\mounts\file share..

    1 person found this answer helpful.