C # opening an inaccessible network path using Process.Start ()

I open directories over the 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 do you first need to make sure very quickly that the network computer does not exist, and the second takes about two minutes? If I'm not mistaken, it is 30 seconds in a Windows environment to determine if the network path is unavailable.

Why is there so much time in this case and how to speed up information that the computer is turned off?

+8
c # windows network-programming unc
source share
2 answers

To download a file, Windows must first create a connection to the file with the file. First, he searches for the UNC name to get the IP address. If the machine does not exist, it cannot obtain an IP address, and it completes quickly (as in the first example). If it exists (as in the second example), Windows should try to connect.

So why take two minutes when the wait time should be 30 seconds? One possibility is that it repeats several times. Another possibility is that you have different network protocols and everyone should try it.

+6
source share

A faster way to check if the computer is turned on is to ping the computer. Indicate any timeout that you like. Within a few seconds there should be an answer ...

I think that the slow answer should do something with the fact that the name of the shutdown computer is still known on the network and is connected to ip. Then a longer timeout is selected, since the computer must be there ...

+1
source share

All Articles