【发布时间】:2010-06-11 15:43:56
【问题描述】:
我尝试从 https 站点下载文件,每次将文件保存到我的机器时它只有 1KB。该文件应该是1MB。我正在使用 Webclient。
string strFile = @"c:\myfile.txt";
WebClient wc = new WebClient();
wc.Credentials = new System.Net.NetworkCredential("userid", "pw");
wc.DownloadFile("https://www.mysite.come/myfile.txt", strFile);
我有什么想念的吗?
【问题讨论】:
-
你看过正文的内容了吗?是文件的前 1K 还是别的什么?
-
哇,6 个问题,没有一个被接受……你应该做点什么