I'm opening directories over network using:
System.Diagnostics.Process.Start(path); // path = UNC network path
But having 2 network paths:
\\This_PC_Does_Not_Exist\dir
\\This_PC_Is_Turned_Off\dir
How come first one takes very fast to verify that the network PC doesn't exist, while 2nd takes around two minutes? If I'm not wrong it's 30 seconds in Windows environment to determine if network path is unreachable.
Why does it take so long in this case and how to speed up the info that PC is off?
In order to load the file, Windows must first make a file sharing connection to the machine. First it looks up the UNC name to get the IP address. If the machine doesn't exist, it can't get an IP address, and it fails quickly (as in the first example). If it does exist (as in the second example), Windows must then attempt to connect.
So why does it take two minutes when the time out is supposed to be 30 seconds? One possibility is that it retries a few times. Another possibility is that you have different network protocols and it has to try each one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With