13719654321 发表于 2015-5-30 09:28:22

关于调用FTP中遇到的问题以及解决方案

  1、关于remote server returned an error:550错误信息(File unavailable)

  调试了半天,结果是自己写的ftp路径写错了,反一个反斜杠,记录下来以便日后警醒。
   ///


      /// 创建FtpWebRequest
      ///
      /// FTP路径
      /// FTP方法
      private void OpenRequest(string uriString, string method)
      {
            this.request = WebRequest.Create(new Uri(this.requestUriString + "//" + uriString)) as FtpWebRequest;
            this.request.Credentials = new NetworkCredential(userName, password);
            this.request.UseBinary = true;
            this.request.Proxy = null;
            this.request.KeepAlive = false;
            this.request.Method = method;
      }  
  
页: [1]
查看完整版本: 关于调用FTP中遇到的问题以及解决方案