How do you Login to FTP using C#?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
I'm just throwing my hat in the ring for anyone searching this topic. Here is how I did this recently. I made an FTPProvider class to handle the connection wiring and an FTPSettings class to keep everything modular. This first line below makes the connection and returns the FtpWebRequest you will need to do things like download, delete, and get lists from the FTP server. A complete list and examples can be found here on the msdn.
Something like:
I think... :)
Here is a very nice FTP Client for C#
http://www.codeproject.com/KB/IP/ftplibrary.aspx
Snippett from Link
Native FTP support in .NET is fiddly.
I suggest using the free edtFTPnet component - I have used this in enterprisey applications with no problems whatsoever.
http://www.enterprisedt.com/products/edtftpnet/overview.html