I'm unable to determine the reason for the problem that I have copying binary files from my Linux VM to my Windows VM.
Steps performed:
On Linux:
- Enabled apache2 service on Linux
- Copied the exe file to /var/www
On windows:
- Opened a PowerShell session
Executed
(new-object system.net.webclient).downloadfile("http:// IPadd /file.exe","file.exe")
I receive the following error:
Exception calling "DownloadFile" with "2" argument(s): " The remote server returned an error: (404) Not Found." At line:1 char:47
+ (new-object system.net.webclient).downloadfile <<<<
("http://< IPADD >/file.exe","file.exe")
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
The command is very simple and it works fine if the copied file is an ASCII file but it always gives that error for any binary file.
I didn't find any difference copying text or executable files in PowerShell.
Is there a mistake here?