views:

40

answers:

2

I'm still kind of a beginner...

I have to write a C# program that works only needs to work on Windows. It has to allow the user to select a file to upload. That file will be uploaded to a folder on a remote Linux server. I know the username, password, and url for this Linux machine. Does anyone know how I go about connecting to the server and then uploading the file to it in a C# desktop application?

Thanks.

+1  A: 

If you're going to upload over FTP, the FtpWebRequest should do the trick:

http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.aspx

David
A: 

So I came up with this answer before looking at the first response (David's). Interestingly, we came up with the same solution! An ftp upload was what I was looking for. I completely forgot about FTP.

MSDN also has this web page for a more succinct how-to: http://msdn.microsoft.com/en-us/library/ms229715.aspx

Brad