我想要实现的功能就是将C盘的11.docx文档上传到服务器地址http://localhost:8010/的DOC文件夹内,并以hello.docx重命名保存。调用的是WebClient的UploadFile方法,参数(string address,string method,string fileName),始终会出现远程服务器返回错误:404未找到.注,调用下载方法时,能从服务器成功下载
 public static bool Upload( string newFileName)
          {     
             WebClient myWebClient = new WebClient();
            myWebClient.Credentials = CredentialCache.DefaultCredentials; 
              try
              {
               myWebClient.UploadFile("http://localhost:8010/DOC/hello.docx", "PUT", @"C:\11.docx");
             }
              catch (Exception e)
              {
                  MessageBox.Show("文件上传失败,请稍后重试");
                  return false;
              }
              return true;
          }c#WebClientUploadFile