C#没有封装ftp的相关程序,如果要用ftp的话 可以使用socks编程。你可以用下面的url来下载一个原码。 http://www.csharphelp.com/archives/archive9.html如果你有钱,当然可以买第三方的封装的模块。199美元, 做得很好的。你可以看一下简介:(Mabry Ftp/NET) Public Instance Classes FtpState Provides information about the state of the Ftp component Public Instance Properties ControlSocket The Socket being used for the FTP protocol's command/response protocol. DebugMode Gets or sets a value which controls the use of the Debug Event PassiveMode Gets or sets a value which controls the way sockets are opened for data transfers ProxyEndPoint Gets or sets a Proxy Server's EndPoint. ProxyLogonName Gets or sets the Name used to log on to a proxy server. ProxyLogonPassword Gets or sets the Password used to log on to the proxy server. ProxyType Gets or sets a value which specifies the type of proxy server to use. State Gets a value which provides information about the current state of the component. TransferType Gets or sets a value which determines whether file transfers are Binary or Text. Public Instance Methods Abort Cancels methods which are in process. AppendFile Appends the source (local) file to the destination (server) file. BeginAbort Cancels methods which are in process. BeginAppendFile Appends the source (local) file to the destination (server) file. BeginChangeDirectory Changes the server's current directory. BeginConnect Connects to an FTP server. BeginDeleteDirectory Deletes the specified directory from the server. BeginDeleteFile BeginGetCurrentDirectory Begins retrieval of a string which represents the server's current directory. BeginGetDirectoryList Begins retrieval of a list of the contents of the current server directory. BeginGetFile Retrieves a file from the ftp server. BeginMakeDirectory Creates a new directory on the server. BeginPutFile Copies a local file to the ftp server. BeginPutUniqueFile Copies a local file to the ftp server, which gives it a unique name. BeginReadServerResponse Returns an Array containing one or more strings sent by the server in response to BeginSendFtpCommand BeginRename Renames a file on the server BeginSendFtpCommand Sends a command string to the FTP server. BeginSetType Sets the server's data transfer mode. ChangeDirectory Changes the server's current directory. Connect Connects to an FTP server. DeleteDirectory Deletes the specified directory from the server. Disconnect Dispose Frees any resources being used by the component. EndAbort Ends a pending asynchronous connection request. EndAppendFile Ends a pending asynchronous connection request. EndChangeDirectory Ends a pending asynchronous connection request. EndConnect Ends a pending asynchronous connection request. EndDeleteDirectory Ends a pending asynchronous connection request. EndDeleteFile Ends a pending asynchronous connection request. EndGetCurrentDirectory Ends a pending asynchronous connection request. EndGetDirectoryList Ends a pending asynchronous connection request. EndGetFile Ends a pending asynchronous connection request. EndMakeDirectory Ends a pending asynchronous connection request. EndPutFile Ends a pending asynchronous connection request. EndReadServerResponse Returns the strings sent by the server in response to a command. EndRename Ends a pending asynchronous connection request. EndSendFtpCommand Signals completion of the corresponding BeginSendFtpCommand. GetCurrentDirectory Retrieves a string which represents the server's current directory. GetDataSocket Retrieves a socket which has been connected to the server for a data transfer. GetDirectoryList Retrieves of a list of the contents of the current server directory. GetFile Retrieves a file from the ftp server. MakeDirectory Creates a new directory on the server. PutFile Copies a local file to the ftp server. PutUniqueFile Copies a local file to the ftp server, which gives it a unique name. ReadServerResponse Returns an Array containing one or more strings sent by the server in response to SendFtpCommand Rename Renames a file on the server SetType Sets the server's data transfer mode. Public Instance Events Debug Fired from time to time when the component has debugging information to provide. DirectoryItem Disconnected Progress StateChanged Enumerations TransferTypes Specifies the FTP data connection transfer type. See Also Mabry.Net.Clients.Ftp.Ftp Class | Mabry.Net.Clients.Ftp Namespace
可以使用socks编程。你可以用下面的url来下载一个原码。
http://www.csharphelp.com/archives/archive9.html如果你有钱,当然可以买第三方的封装的模块。199美元,
做得很好的。你可以看一下简介:(Mabry Ftp/NET)
Public Instance Classes
FtpState Provides information about the state of the Ftp component Public Instance Properties
ControlSocket The Socket being used for the FTP protocol's command/response protocol.
DebugMode Gets or sets a value which controls the use of the Debug Event
PassiveMode Gets or sets a value which controls the way sockets are opened for data transfers
ProxyEndPoint Gets or sets a Proxy Server's EndPoint.
ProxyLogonName Gets or sets the Name used to log on to a proxy server.
ProxyLogonPassword Gets or sets the Password used to log on to the proxy server.
ProxyType Gets or sets a value which specifies the type of proxy server to use.
State Gets a value which provides information about the current state of the component.
TransferType Gets or sets a value which determines whether file transfers are Binary or Text. Public Instance Methods
Abort Cancels methods which are in process.
AppendFile Appends the source (local) file to the destination (server) file.
BeginAbort Cancels methods which are in process.
BeginAppendFile Appends the source (local) file to the destination (server) file.
BeginChangeDirectory Changes the server's current directory.
BeginConnect Connects to an FTP server.
BeginDeleteDirectory Deletes the specified directory from the server.
BeginDeleteFile
BeginGetCurrentDirectory Begins retrieval of a string which represents the server's current directory.
BeginGetDirectoryList Begins retrieval of a list of the contents of the current server directory.
BeginGetFile Retrieves a file from the ftp server.
BeginMakeDirectory Creates a new directory on the server.
BeginPutFile Copies a local file to the ftp server.
BeginPutUniqueFile Copies a local file to the ftp server, which gives it a unique name.
BeginReadServerResponse Returns an Array containing one or more strings sent by the server in response to BeginSendFtpCommand
BeginRename Renames a file on the server
BeginSendFtpCommand Sends a command string to the FTP server.
BeginSetType Sets the server's data transfer mode.
ChangeDirectory Changes the server's current directory.
Connect Connects to an FTP server.
DeleteDirectory Deletes the specified directory from the server.
Disconnect
Dispose Frees any resources being used by the component.
EndAbort Ends a pending asynchronous connection request.
EndAppendFile Ends a pending asynchronous connection request.
EndChangeDirectory Ends a pending asynchronous connection request.
EndConnect Ends a pending asynchronous connection request.
EndDeleteDirectory Ends a pending asynchronous connection request.
EndDeleteFile Ends a pending asynchronous connection request.
EndGetCurrentDirectory Ends a pending asynchronous connection request.
EndGetDirectoryList Ends a pending asynchronous connection request.
EndGetFile Ends a pending asynchronous connection request.
EndMakeDirectory Ends a pending asynchronous connection request.
EndPutFile Ends a pending asynchronous connection request.
EndReadServerResponse Returns the strings sent by the server in response to a command.
EndRename Ends a pending asynchronous connection request.
EndSendFtpCommand Signals completion of the corresponding BeginSendFtpCommand.
GetCurrentDirectory Retrieves a string which represents the server's current directory.
GetDataSocket Retrieves a socket which has been connected to the server for a data transfer.
GetDirectoryList Retrieves of a list of the contents of the current server directory.
GetFile Retrieves a file from the ftp server.
MakeDirectory Creates a new directory on the server.
PutFile Copies a local file to the ftp server.
PutUniqueFile Copies a local file to the ftp server, which gives it a unique name.
ReadServerResponse Returns an Array containing one or more strings sent by the server in response to SendFtpCommand
Rename Renames a file on the server
SetType Sets the server's data transfer mode. Public Instance Events
Debug Fired from time to time when the component has debugging information to provide.
DirectoryItem
Disconnected
Progress
StateChanged Enumerations
TransferTypes Specifies the FTP data connection transfer type. See Also
Mabry.Net.Clients.Ftp.Ftp Class | Mabry.Net.Clients.Ftp Namespace
回复人: acptvc(微软全球技术中心 VC技术支持) (2001-12-20 18:50:36) 得0分
感谢您使用微软产品。关于断点续传技术建议参考相应的RFC。FTP的断点续传可以在RFC959中查阅有关"REST"命令的部分。HTTP 1.1中的断点续传可以在RFC2616中查阅"Header Field Definitions"一章中关于Content-Range属性的说明。断点续传需要服务器端的支持,大部分FTP服务器和HTTP服务器(包括微软的IIS)都支持断点续传。
- 微软全球技术中心 VC技术支持本贴子仅供CSDN的用户作为参考信息使用。其内容不具备任何法律保障。您需要考虑到并承担使用此信息可能带来的风险。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
为了为您创建更好的讨论环境,请参加我们的用户满意度调查(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。