2

我想将文件上传到 https 服务器我已经编写了以下代码将文件上传到 https 服务器。但它给出的错误:

远程服务器返回错误:(404) Not Found。

我的代码如下。检查代码有什么问题?

       try
        {
            using (WebClient webClient = new WebClient())
            {
                webClient.Credentials = new NetworkCredential(username, password);
                string filePath = filepath;
                webClient.UploadFile(@"https://us.itranscript.net:444/Upload/test.txt", "PUT", filePath);
                webClient.Dispose();
            }
        }
        catch (Exception err)
        {

        }

帮我

4

0 回答 0