日期:2014-05-18 浏览次数:20943 次
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; };