日期:2014-05-18  浏览次数:20931 次

net 如何处理FTP/SSL 端口为990 的文件上传以及下载
ftp服务器:192.168.11.990 
加密方式是TLS/SSL Implicit 端口:990
用户:test
密码:test
如果用NET实现上诉服务器的文件上传以及下载?

谢谢!


------解决方案--------------------
参考
http://blogs.msdn.com/adarshk/archive/2005/04/22/410925.aspx
------解决方案--------------------
C# code


FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://xx.xxx.xxx.xx/");
request.Method = WebRequestMethods.Ftp.ListDirectory;
request.Credentials = new NetworkCredential("<UserName>", "<Password>");

request.EnableSsl = true;
ServicePointManager.ServerCertificateValidationCallback = delegate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; };