How to fix the «The network name cannot be found» issue while connecting from Windows to a Samba server?

In my case it was because I forgot to create the shared folder in Samba server's filesystem.

See also: