首页 > 代码库 > 下载打开PDF报错,其它文件OK
下载打开PDF报错,其它文件OK
IE8, 在 SSL站点上下载、打开pdf文件,报如下的异常,原因是因为IE8的bug引起的。
https://support.microsoft.com/en-us/kb/323308
http://stackoverflow.com/questions/3415370/ie-unable-to-download-from-unable-to-open-this-internet-site-the-request
--------------------------------------------------------------------------------
Unable to download AttachmentsList.aspx from 192.168.0.50.
Unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
--------------------------------------------------------------------------------
Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(fileName).Replace("+", "%20")); //resolve the filename with empty space char Response.ContentType = "application/octet-stream"; Response.OutputStream.Write(buffer, 0, fileSize); Response.Flush(); Response.Close();
下载打开PDF报错,其它文件OK
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。