Reputation: 22486
Visual Studio 2008
I have a xml file I want to send to a ubuntu server.
Before I was using the following to save on the current machine in the application folder. However, the customer has changed and now wants to store it on a remote network ubuntu server.
dt.WriteXml(System.IO.Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Config.xml"));
What is the best way to send files across the network? Is it possible to send files from a windows machine to a ubuntu server machine?
Many thanks for any advice,
Upvotes: 0
Views: 406
Reputation: 131334
The easiest solution is probably to use a samba daemon and plain old file copying. If your customer wants to use the Ubuntu server as a file server, they may have already set this up.
Another option is to run an FTP daemon on the server and use the WebClient class to upload the file to it. You can use the WebClient.UploadFile method to upload a file to the server or WebClient.UploadString to upload the string directly, using the FTP STOR command.
Upvotes: 1
Reputation: 76736
Run a samba daemon on the ubuntu server and you can use shared folders (SMB) to transfer the file.
Upvotes: 1
Reputation: 798606
The easiest thing to do is probably to SCP it onto the remote machine.
Upvotes: 1