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 Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,113 questions
Windows Server Security
Windows Server Security
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
1,720 questions
Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,541 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,351 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