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

资源分类:C# 工具:Visual Studio 2005



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.