Downloaded file using webclient.DownloadFileAsync has 0KB

前端 未结 4 1965
情话喂你
情话喂你 2020-12-11 14:43

I\'m trying to download zend-framework (from http://framework.zend.com/releases/ZendFramework-1.11.11/ZendFramework-1.11.11.zip) simply using WebClient

strin         


        
4条回答
  •  眼角桃花
    2020-12-11 14:49

    If you have UAC enabled in Windows "C:\temp.zip" in the following line will fail to save the file because you aren't allowed to write outside of user directories without elevated permissions:

    downloader.DownloadFileAsync(new Uri(url), "C:\\temp.zip");
    

提交回复
热议问题