.NET 2.0下的FTP客户端源码库

收录时间:2014-03-06
资源分类:C# 工具:Visual Studio 2005

本程序有C#代码实现,在FtpWebRequest和HttpWebRequest的基础上实现最简单的FTP常用功能。

支持登录FTP服务器,按用户名和密码自动登录服务器,上传,下载FTP文件。

An FTP client library for .NET 2.0

One annoying omission from the 1.x framework for .NET was support for FTP. This could be rectified by various libraries (some free, others commercial) that filled this gap. However, with Visual Studio 2005 and 2.0 of the .NET framework, FTP makes a welcome appearance.

As well as adding FTP, Microsoft has moved support for web, mail and FTP requests out of System.Web and into System.Net which is a more logical approach.

There is still a problem however: the FTP support isn't actually an FTP client, it's just support for the protocol in FtpWebRequest, in the same way as HttpWebRequest supports web requests. There is no "download a file" or "get a directory listing" function - you're still left to sort this out yourself.

This is where I hope my library FTPclient will come in useful. It's not a full-featured and comprehensive client but it provides all the most frequently used functions and can act as a base to add any missing ones if you need them.

Making any type of FTP requests can be broken down into six steps:

    Create a web request for a URL.
    Set the login credentials (username, password).
    Set the required options and the action to perform.
    Upload data required (not used by some actions).
    Download data or results (again, not used by some actions).
    Close the request (and connection).

文件下载列表
FtpClient.zip (42.12KB)  FtpClientCS.zip (6.36KB)  
附件内容
Form1.Designer.vb  Form1.vb  Application.Designer.vb  ApplicationEvents.vb  AssemblyInfo.vb  Resources.Designer.vb  Settings.Designer.vb  FtpClient.vb  FtpClient.cs  
标签: FTP 
更多

目前尚无评论

用户反馈   关于我们
Copyright (©) ZHIHUISHI.COM 2013 All Rights Reserved.
京ICP备12012558号-7