I had validated this.To download SSMS which is more than 500M+
 static void Main(string[] args)
{
string url = "https://go.microsoft.com/fwlink/?linkid=2108895&clcid=0x409";
DownloadBigFile(new Uri(url), "ssms.exe");
} static void DownloadBigFile(Uri url, string outputFilePath)
{
const int BUFFER_SIZE = * ;
using (var outputFileStream = File.Create(outputFilePath, BUFFER_SIZE))
{
var req = WebRequest.Create(url);
using (var response = req.GetResponse())
{
using (var responseStream = response.GetResponseStream())
{
var buffer = new byte[BUFFER_SIZE];
int bytesRead;
do
{
bytesRead = responseStream.Read(buffer, , BUFFER_SIZE);
outputFileStream.Write(buffer, , bytesRead);
} while (bytesRead > );
}
}
}
}

C# download big file的更多相关文章

  1. Unity3D发布WebPlayer时Failed to download data file解决方案

    今天发布WebPlayer时, 发现直接打开html是可以正常运行的, 但是通过iis访问的话就会报错: Failed to download data file. 一开始以为是防火墙, 后来发现不是 ...

  2. How to download a file with plus symbol(+) filename in IIS?

    How to download a file with plus symbol(+) filename in IIS? Original post link:https://www.cnblogs.c ...

  3. Unity 3D本地公布WebPlayer版时"Failed to download data file"解决方式

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbGlzZW55YW5n/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA ...

  4. Pikachu-File Inclusion, Unsafe file download & Unsafe file upload

    Pikachu-File Inclusion, Unsafe file download & Unsafe file upload 文件包含漏洞 File Inclusion(文件包含漏洞)概 ...

  5. Download Excel file with Angular

    源码连接(编写中) 用Angular下载后台返回的Excel文件,用Blob实现,引用FileSaver.js 后台C#代码: [WebMethod] public static byte[] Cal ...

  6. how to download a file with Nodejs(without using third-party libraries)用node下载文件

    创建HTTP GET请求并将其管理response到可写文件流中: var http = require('http'); var fs = require('fs'); var file = fs. ...

  7. Unity 3D本地发布WebPlayer版时Failed to download data file解决方案

    遇到这个问题就是指Web服务器并没有支持这种*.unity3d文件类型.需要做的是在Web服务器中添加MIME类型: IIS 7 及以上版本: 在功能视图的IIS选项卡中: 双击打开MIME,选择添加 ...

  8. R包安装失败failed to download mirrors file

    在R console中使用install.packages()来安装第三方包时,会出现这样的错误: 即使我们选择的是China的镜像也解决不了问题. 这时候,可以先试试用IE打开上图中黑底部分的URL ...

  9. curl download zip file

    https://askubuntu.com/questions/285976/download-zip-file-with-curl-command

随机推荐

  1. appium元素定位之AndroidUiAutomator

    UIAutomator 元素定位是 Android 系统原生支持的定位方式,虽然与 xpath 类似,但比它更好用,并且支持元素全部的属性定位,定位原理是通过 android 自带的android u ...

  2. 一起学SpringMVC之Json

    本文主要以一个简单的小例子,简述SpringMVC开发中,Json的相关应用,仅供学习分享使用,如有不足之处,还请指正. 什么是Json ? JSON 指的是 JavaScript 对象表示法(Jav ...

  3. Scrapy框架的简单使用

    一.安装依赖 #Windows平台 1.pip3 install wheel 3.pip3 install lxml 4.pip3 install pyopenssl 5.pip3 install p ...

  4. Add an Editor to a Detail View 将编辑器添加到详细信息视图

    In this lesson, you will learn how to add an editor to a Detail View. For this purpose, the Departme ...

  5. HTML 本地存储

    HTML 本地存储:优于 cookies. 什么是 HTML 本地存储? 通过本地存储(Local Storage),web 应用程序能够在用户浏览器中对数据进行本地的存储. 在 HTML5 之前,应 ...

  6. MySQL基础之练习题

    题目 现有班级.学生以及成绩三张表: 备注:表名称和字段名称可以参考表格内单词设置 根据表格信息,按要求完成下面SQL语句的编写: 1.使用SQL分别创建班级表.学生表以及成绩表的表结构,表内数据可以 ...

  7. centos图形化桌面安装过程

    连接 1.安装xwindow yum -y groupinstall "X Window System" \\安装 X Window System 环境 2.安装gnome des ...

  8. Druid-代码段-4-1

    所属文章:池化技术(一)Druid是如何管理数据库连接的? 本代码段对应主流程4,丢弃连接的守护线程: //连接池瘦身,参考主流程4 public class DestroyConnectionThr ...

  9. Python Django,事务,transaction.atomic,事务保存点

    from django.shortcuts import renderfrom django.http import HttpResponsefrom django.views.generic imp ...

  10. AcWing 27. 数值的整数次方

    地址 https://www.acwing.com/problem/content/description/26/ 题目描述实现函数double Power(double base, int expo ...