在 IE 5.5 / IIS 5.0 中通过 HTTPS 下载文件

发布于 2024-08-05 23:03:17 字数 714 浏览 1 评论 0 原文

我迫切需要这方面的帮助。我在 IIS 5 中有一个经典的 ASP 网站,我需要将 pdf 流式传输给用户。我使用 ADODB.Stream 生成二进制数据块,并使用 response.BinaryWrite 将其流式传输到客户端。现在的问题是,IE 中有一个已知功能,默认情况下将 SSL (https) 站点的 Response CacheControl 标头设置为“无缓存”。因此,我收到标准错误:

“Internet Explorer 无法从 ServerName 下载 File.doc。Internet

Explorer 无法打开此 Internet 站点。请求的站点不可用或找不到。请稍后重试。”

我在流式传输之前设置了 Response.CacheControl = "private,must-revalidate,max-age=3600" ,但它仍然给出错误。

注意:相同的代码在所有其他浏览器(如 firefox 和 netscape)中都可以完美运行。我在 firefox 中使用 LiveHttpHeaders 来查看 Response.CacheControl 在 firefox 中自动正确设置。不幸的是,我无法在我的机器上安装 Fiddler,但我猜测问题是由于 IIS 默认标头 CacheControl =“no-cache” for https

我没有选中 IE 中的“不将加密页面保存到磁盘”选项。

我需要一种解决方法,因为必须尽快通过现有技术通过互联网向用户提供该选项:(

I desperately need help with this one. I have a classic ASP website in IIS 5, where I need to stream pdf to users. I am using ADODB.Stream to generate chunks of binary data and using response.BinaryWrite to stream it to client. Now problem is that there is a known feature in IE which sets the Response CacheControl header to "no-cache" by default for SSL (https) sites. Hence I am getting the standard error:

"Internet Explorer cannot download File.doc from ServerName.

Internet Explorer was not able to open this Internet Site. The requested site is either unavailable or cannot be found. Please try again later."

I have set Response.CacheControl = "private,must-revalidate,max-age=3600" before streaming, but it still give the error.

Note: The same code works perfectly in all other browsers like firefox and netscape.I am using LiveHttpHeaders in firefox to see that Response.CacheControl is automatically set correctly in firefox. Unfortunately i cannot install Fiddler on my machine, but i am guessing problem is due to IIS default header CacheControl = "no-cache" for https

I have unchecked the "Do not save encrypted pages to disk" option in IE.

I need a way around this since the option has to be made available very soon to users over the internet with existing technology :(

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

懒猫 2024-08-12 23:03:17

从这里开始: http://blogs.msdn.com/ieinternals/archive/2009/10/02/Internet-Explorer-cannot-download-over-HTTPS-when-no-cache.aspx 查看对这个问题进行更充分的讨论。您很可能正在发送一个或多个禁止缓存的标头。

该声明...

IE 中有一个已知的功能
设置响应 CacheControl 标头
SSL 默认为“无缓存”
(https) 网站

...不正确。您的意思是说“IIS”吗?哪个版本?我从来没有听说过这样的功能。

我不知道为什么你不能在有问题的机器上使用Fiddler?

Start here: http://blogs.msdn.com/ieinternals/archive/2009/10/02/Internet-Explorer-cannot-download-over-HTTPS-when-no-cache.aspx to see a fuller discussion of this issue. It's quite likely that you're sending one or more headers that forbid caching.

The statement...

there is a known feature in IE which
sets the Response CacheControl header
to "no-cache" by default for SSL
(https) sites

... is incorrect. Did you mean to say "IIS"? Which version? I've never heard of such a feature.

I don't know why you can't use Fiddler on the machine in question?

梦纸 2024-08-12 23:03:17

也许这可以帮助:
链接

我通过在 iis 管理控制台的 http headers 选项卡上检查“启用内容过期”解决了类似的问题。

maybe this could help:
Link

I solved a similar problem checking "enable content expiration" on the http headers tab of the iis management console.

迷途知返 2024-08-12 23:03:17

您也许可以放弃对 Internet Explorer 5.5 的支持,因为 它的支持率低于 0.5%市场的。它太低了,他们在 6 月 8 日就停止追踪了。

You might be able to get away with dropping support for Internet Explorer 5.5 as it has less than .5% of the market. It so low they stopped tracking it on in jun 08'

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文