Download file over HTTPS in IE 5.5 / IIS 5.0

这一生的挚爱 提交于 2019-12-11 06:39:52

问题


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 :(


回答1:


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?




回答2:


maybe this could help: http://blogs.msdn.com/b/ieinternals/archive/2009/10/02/internet-explorer-cannot-download-over-https-when-no-cache.aspx

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




回答3:


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'



来源:https://stackoverflow.com/questions/1506874/download-file-over-https-in-ie-5-5-iis-5-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!