Reputation: 21
I have created the Azure Storage, in that added some file to Azure File Share, I want to access those file externally, there you can map it as Network drive to local computer. There it was recommended add outbound rule for 445 port. same I did and 445 is listeneing once I checked the netstat, but still not able to map the drive using map drive from file explorer. I tried through powershell too. I am getting below error. Credentials are also correct. I am able to connect to fileshare through .NET code.
Tried connecting to CMD too: getting following error:
System error 53 has occurred.
The network path was not found.
Powershell giving following error:
New-PSDrive : The network resource type is not correct
At line:3 char:1
+ New-PSDrive -Name Z -PSProvider FileSystem -Root "\\socfileshare.file ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Z:PSDriveInfo) [New-PSDrive], Win32Exception
+ FullyQualifiedErrorId : CouldNotMapNetworkDrive,Microsoft.PowerShell.Commands.NewPSDriveCommand
Upvotes: 2
Views: 4179
Reputation: 21
Its a possibility that your ISP is blocking port 445. Please run
Test-NetConnection -ComputerName ([System.Uri]::new($storageAccount.Context.FileEndPoint).Host) -Port 445
Instructions here - https://learn.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-windows
A workaround for port 445 is to setup a VPN tunnel - Instructions are temporarily hosted here - https://github.com/RenaShahMSFT/AzureFilesVPN
Upvotes: 2