FTP http://www.codeproject.com/csharp/FTP.asp

解决方案 »

  1.   

    ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/frlrfSystemNetWebClientClassTopic.htm
      

  2.   

    这个就是HTTP的呀!
    别告诉我你要用套接字吧!那就有点烦了。呵呵!
      

  3.   

    try
    {
    String uriString ="http://192.168.0.56/testweb";
    WebClient myWebClient = new WebClient();
    string fileName = this.tBlocalFile.Text.ToString();
    byte[] responseArray = myWebClient.UploadFile(uriString,"POST",fileName);
    MessageBox.Show("上传成功!");
    }
    catch(Exception ex)
    {
    MessageBox.Show(ex.Message);
    }
    异常:远程服务器返回错误:(405)不允许的方法
    我在虚拟目录中设置了“写入”的。为什么会报这个异常?