UNC Path vs Physical Path and OS security layers

hooked 1 Reputation point
2021-09-15T16:58:53.36+00:00

I develop Windows application that write data to file located on filesystem.
I have 2 options to reach the filesystem:

  1. Physical path: C:\Folder\Myfile.txt
  2. UNC Path (Configured RWX MyShare): \MyShare\Myfile.txt

When using UNC path, we sometimes receive "unexpected network error occurred".

I am wondering if UNC and Physical path is using different drivers/kernel modules/security layers internally in the OS?

On linux when you File.Open or File.Read, it depend on the filesystem type, each filesystem will have different implementation, you will go through different security layers. Is it the same on windows?

Questions:

  1. When using UNC / Physical path, do we go via different drivers / seucity layers?
  2. When Using UNC, Could it be Endpoint protection/Firewall/Antivirus might add additional security layer?
Windows for business Windows Client for IT Pros Devices and deployment Other
Windows for business Windows Server User experience Other
Windows for business Windows Server Devices and deployment Configure application groups
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,916 Reputation points
    2021-09-16T09:56:51.173+00:00

    Hello Hooked,

    When working with UNC files there are 2 main things to take in consideration:

    1. Explicitly opening for SMB communication
      RPC EPM TCP 135 - 139
      RPC over HTTPS TCP 593
      SMB (for named pipes) TCP 445
    2. Resilience of network
      When the error happens, you may try to "clean" the network usage, in order to confirm if there is any local bottleneck of the computer: Run>
      ipconfig /flushdns
      nbtstat –RR
      netsh int ip reset
      netsh winsock reset

    Hope this helps in your case,
    Best regards,

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.