@H_404_8@
@H_404_8@
Internet Explorer cannot download ProductContentFormImage.aspx from localhost.@H_404_8@
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.@H_404_8@
我正在使用下面的代码.@H_404_8@
@H_404_8@
byte[] content = (byte[])Session["contentBinary"];Response.ClearContent();Response.Clearheaders();Response.Clear();Response.Buffer = true;Response.Expires = 0;Response.ContentType = "application/zip";response.addheader("Content-Length",content.Length.ToString());response.addheader("Content-disposition","attachment; filename=content.zip");Response.Cache.SetCacheability(httpCacheability.NoCache);Response.BinaryWrite(content);Response.End();解决方法 这是一个特定于IE的奇怪小错误.
@H_404_8@
基本上,当您将到期时间设置为0时,问题就出现了.@H_404_8@
IE基本上经历了以下过程:@H_404_8@
> IE确定该文件是“下载”的,这会导致IE打开“文件下载”d出窗口.
>一旦用户点击“打开”或“保存”,IE就会尝试下载该文件,但由于它已设置为立即过期,因此IE会启动.@H_404_8@
将您的到期时间设置为一个非零的小数字,例如1分钟,您应该会看到问题消失.@H_404_8@ 总结
以上是内存溢出为你收集整理的c# – 写出一个zip文件在IE7中不起作用全部内容,希望文章能够帮你解决c# – 写出一个zip文件在IE7中不起作用所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)