阅读背景:

下载功能失败,文件大小很大

来源:互联网 

Hi my download function.

嗨我的下载功能。

protected void downloadFunction(string fileName)
{
    string filePath = @"D:\SoftwareFiles\";
    LogMessageToFile("Download started " + filePath + fileName);
    byte[] array = File.ReadAllBytes(filePath + fileName);


    Response.Clear();
    Response.ContentType = "application/x-newton-compatible-pkg";
    Response.AppendHeader("Content-Disposition", 
                          "attachment;filename=" + fileName);

    Response.BinaryWrite(array);
    Response.End();
}
protected



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: