views:

136

answers:

3

My Windows client application (written in C#) works with the remote MySQL database deployed on *NIX server.

I'm going to add the ability to store files on the server. I was never fond of storing files in DB, so the files will be stored in the file system. The application will need to upload, download, and delete files from server.

Any approach I can think of requires additional service to be deployed on server. So far my favorite is SFTP*, but there are other solutions which are IMO inferior:

  1. Web Service - are there any? haven't done any research in this direction.

  2. FTP server - brings at least all the problems connected with protocol itself

  3. WebDAV - interesting option, considering there is Apache module and .NET libraries

  4. Some ad-hoc script (clearly the worst solution)

*I intend to use SharpSSH library, and public key authentication to access special account on the server which will be restricted to SSH operations only

Edit: corrected some terms confusion, thanks to @vartec

A: 
vartec
Thank you for your correction, I actually had SFTP in mind which SharpSSH certainly supports, and it's free :)
dolzenko
As for server configuration - I think tinkering with user accounts, private/public keys on server/client isn't much easier than setting up say WebDAV or some Web Service
dolzenko
@dolzenko True. I've assumed that you already have accounts. If not, WebDAV might be good option.
vartec
A: 

I would use vsftpd on the *NIX server side: it's small and easy to configure, and I haven't had any problems with it since I initially set it up about 6 months ago so it's also reliable. I just use regular FTP, but you can do SSL with vsftpd if you're concerned about security.

On the client side there is this free, open source, FTP Client Library for C# made by Dan at C-SharpCorner.com. It works, and it's easy to extend its functionality to do more things. For example, I added a function for changing file permissions on the remote server.

David Grayson
A: 

putty and winscp are all you need.

dicroce