码迷,mamicode.com
首页 > 其他好文 > 详细

下载打开PDF报错,其它文件OK

时间:2017-02-05 12:34:39      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:dtc   eve   sdn   type   pdb   jms   tns   svi   ttl   

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

标签:dtc   eve   sdn   type   pdb   jms   tns   svi   ttl   

原文地址:http://www.cnblogs.com/bebass/p/4670655.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!