Connecting Tech Pros Worldwide Forums | Help | Site Map

FTP File Upload

Newbie
 
Join Date: Sep 2009
Posts: 4
#1: Sep 14 '09
Hi,

I am looking for a programmatic solution for uploading files to FTP server. Following are the main areas of concern:
  • Security (prefereably use FTPS)
  • Resume of upload (e.g. when client is forcibly turned off)

What are the options in terms of which APIs are the best suited?

Many thanks

Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#2: Sep 14 '09

re: FTP File Upload


Have you taken a look at the FtpWebRequest class to see if it'll do what you want?

All the information you need on the FtpWebRequest class and any other .NET controls can be found in the MSDN Library. This resource should get you pointed in the right direction....there are articles on the FtpWebRequest there. I recommend bookmarking the MSDN Library and using it as your primary resource when developing in .NET.

Please take the time to research the problem before you post your question. The experts here are more than willing to help you with a specific problem but you have to do your part to learn the basics. Please take the time to read over the posting guidelines specifically the section on Before you post your question.
Newbie
 
Join Date: Sep 2009
Posts: 4
#3: Sep 15 '09

re: FTP File Upload


Marvellous! Thanks for introducing MSDN and FtpWebRequest to me. This sorts me out for a lifetime.

However one small glitch remains: my query in the first post is still completely unanswered. Will you please read and more importantly try to understand the query before getting back with your million Kuwaiti dinar advice?
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#4: Sep 15 '09

re: FTP File Upload


I don't understand. What isn't answered?

The FtpWebRequest class (the API) is pretty much all you need...I've only glanced through the article that I linked you to but it looks like all of your questions will be answered there.

?

-Frinny
Newbie
 
Join Date: Sep 2009
Posts: 4
#5: Sep 15 '09

re: FTP File Upload


I'm sorry if I have missed out details in my first post.Because of time constraints I am unable to write and test classes which will take care of issues like FTP uploads over SSL, certificates, compression, encryption, proxies, firewall issues, custom client and server validation etc. Therefore I was looking for a .NET API which could do that and anything else which I might have to take care of in this regard. FtpWebRequest was the first thing I checked and it is not as straightforward as I want, due to time constraints.
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,137
#6: Sep 15 '09

re: FTP File Upload


I doubt that there's an API that will "test" your application's requirements for you.

You could use unit tests for some of your testing. There's a tool that comes with Visual Studio that will help you use unit tests or you could look into using something like nunit.

Part of software development is testing...you really should allocate the proper time for testing.

The thing about your problem is that I don' t know what to suggest because you haven't said if this is a server application or a client application...or if you're implementing both applications...

Stuff like SSL etc is done with server configuration....the "resume on forcible close" would be handled by your code in the client and since it's your code would need to be tested against your software's requirements.
Newbie
 
Join Date: Sep 2009
Posts: 4
#7: Sep 16 '09

re: FTP File Upload


I meant implementation on client side, which will be different from FTP upload when server is configured for FTPS (over SSL). The biggest worry in this area is how do we authenticate the server certificate on the client? Is there any default authentication which is sufficiently reliable? My knowledge in CA and X.509 certificates is limited although I do understand the concept of PKI. Any help in this regard will be brilliant because then there won't be any need for third party APIs.
Reply

Tags
.net, ftp api, ftps, secure file transfer