powershell – System.Net.Webclient仅下载81.4 MB(85,363,075字
发布时间:2020-12-14 05:42:44 所属栏目:Windows 来源:网络整理
导读:[string] $fileName = "en_sql_server_2008_r2_developer_x86_x64_ia64_dvd_522665.iso"[string] $url = "http://installers.abc/iso/$filename"[string] $tempPath = "c:balpreet"function Download-Iso { Param( [string] $FileName,[string] $Url,[strin
[string] $fileName = "en_sql_server_2008_r2_developer_x86_x64_ia64_dvd_522665.iso" [string] $url = "http://installers.abc/iso/$filename" [string] $tempPath = "c:balpreet" function Download-Iso { Param( [string] $FileName,[string] $Url,[string] $destinationFolder ) [string] $destination = Join-Path -Path $tempPath -ChildPath $fileName write-host "downloading from : $url to $destination" $client = new-object System.Net.WebClient $client.DownloadFile( $Url,$destination ) } Download-Iso -FileName $fileName -Url $url -DestinationFolder = $tempPath 我试图从http可访问的远程位置下载4.07 GB(4,380,329,984字节)ISO. Windows 7:下载完整的4.07 GB文件. Windows Server 2008 R2: 有什么线索的原因? 解决方法
这是内部网络代理,由于某种原因,在转移81.4 MB(85,075字节)后丢弃请求.但奇怪的是webclient没有抛出任何异常,并假装下载成功.
修复是使代理为空,因此处理请求而不通过代理. $client.proxy=$null # get rid of proxy $client.DownloadFile( $Url,$destination ) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- recv()windows socket占用无限时间 – 如何超时?
- win10下安装Tensorflow1.7+CUDA9.0+Cudnn7.0.3
- windows-xp – 在Windows Xp Professional上运行Internet E
- DLL – 链接到使用MSVC编译的静态库
- windows – 从MSI文件中检索公共属性
- 在windows上安装ASP.NET Core 的 Docker 映像
- windows驱动程序中的预处理含义
- uwp – 如何使用Universal Windows App中的System.Net.Http
- .net – Windows服务开源框架
- windows – 如何拒绝从特定计算机访问安全项?
推荐文章
站长推荐
热点阅读