下载打开PDF报错,其它文件OK
2017-02-05 11:30
316 查看
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.
--------------------------------------------------------------------------------
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文件 代码
- 如何在html中下载pdf等文件而不是直接打开
- 轻松下载.pdf文件(直接下载,而不是在IE浏览器里面打开)
- weblogic服务上传word等文件直接打开问题解决 博客分类: web应用服务器 在weblogic上发布的web项目,测试中发现出现当上传word、excel、pdf等文件在下载的时候出现
- Java 下载文件,浏览器直接打开,并且PDF再次点击下载时,文件名称设置正确
- Servlet流操作——在浏览器中打开或者下载PDF文件
- Android下载并打开PDF文件
- ios 使用NSURlSession 下载文件并且使用进度条进行文件下载进度读取以及打开附件(word,excel,ppt,pdf)显示
- Android:下载并打开PDF格式文件2----用指定的software
- html5链接直接下载文件 不是直接打开 如pdf, doc 等
- React Native 下载并打开pdf文件
- Android下载并打开PDF文件
- React Native下载打开pdf文件
- 默认点击下载pdf等文件而不是在浏览器中打开
- 记录一下:上传到服务器上的pdf 文件直接下载而非在浏览器里打开
- Android:下载后打开PDF格式文件
- 在线打开.PDF、.TXT等文件,.doc、.xls自动下载
- 轻松下载.pdf文件(直接下载,而不是在IE浏览器里面打开)
- Android:下载后打开PDF格式文件
- springMVC以附件形式下载PDF文件(解决了下载后文件格式出错无法打开的问题)