SoftwareSavant
SoftwareSavant

Reputation: 9767

FTP a file in .net

I am looking to move a file from a directory on a server to a file share using a process running out that server already.

I want to know the best way to do this using the ftp protocol. My initial thoughts on how to do this were to use System.Net.FtpWebRequest... I will probably end up using this, but it looks like there may be some problems with it. To see what I mean check out the following link...'

See What I mean

That being said, in that article, he listed some other libraries that might be of use. Has anyone used any of these libraries? Would it be a good idea for me to try these out? Or should I just stick with FtpWebRequest. I will only be uploading a small file, and maybe it is not worth the time learning new libraries

Upvotes: 0

Views: 335

Answers (3)

Prahlad Yeri
Prahlad Yeri

Reputation: 3663

I've successfully used the FTPWebRequest on many projects without any problems. As long as you don't need implicit SSH functionality, .NET rocks!!

Here is a tutorial I've written on how to go about creating an FTP client in VB.NET: http://dot-net-talk.blogspot.in/2008/12/how-to-create-ftp-client-in-vbnet.html

Here is the open-source library of an ftp client I've coded in C#: http://libftp.codeplex.com/

Upvotes: 0

paul
paul

Reputation: 22011

If you are moving a file from a local server to a path accessible by network share from that server then there is no need to use FTP, you could just use File.Copy()

Upvotes: 2

Christopher Klein
Christopher Klein

Reputation: 2793

Personally I use the SSH.NET Library found over on Codeplex for its ability to use SFTP. You did not mention if security,encryption or compression was a requirement but this is a pretty tight little port over from java that runs in .NET 4.0

Upvotes: 1

Related Questions