问题描述
我正在尝试实现一个页面,允许Excel用户通过Excel提供的Web查询功能使用它提供的数据。
I'm trying to implement a page that allows Excel users to use the data it provides via the Web Query feature provided by Excel.
这一切都很漂亮只要我使用HTTP(甚至BASIC用户身份验证工作)。
It's all working out pretty nicely, as long as I use HTTP (even BASIC user authentication works).
一旦我切换到HTTPS,Excel将不再下载数据(它是甚至是一个完全官方的SSL证书,所以这不是一个自签名的问题)。
As soon as I switch that over to HTTPS Excel won't download the data anymore (it's even a fully official SSL certificate, so it's not a problem with a self-signed one).
几乎描述了这个问题。
This Microsoft knowledge base article pretty much describes the problem.
现在的部分让我想知道是这样的:
Now the part that makes me wonder is this:
这似乎意味着有一些方式让这个工作起来,但是在方向上还没有提示我需要看在
This seems to imply that there is some way to get this working, but there's not even a hint at the direction I need to look at.
如果因为安全Web服务器上的设置被采用为面值,或者只是微软的一种说法,这不会
Should the "because of the settings on the secure Web server" be taken at face value, or is it just a Microsoft way of saying "this won't work unless you buy the right software from us"?
推荐答案
似乎我发现了这个问题:
It seems I've found the problem:
如果页面的HTTP标头指定不应该通过HTTPS传输缓存和,MS Excel似乎无法使用页面上的数据(通过HTTP发送的相同标题似乎被忽略)。
MS Excel seems to be unable to use the data on the page if the HTTP headers of the page specify that it should not be cache and it is transfered via HTTPS (the same headers sent via HTTP seem to get ignored).
所以通过不发送这些标题,Excel突然能够访问数据:
So by not sending these headers, Excel was suddenly able to access the data:
Pragma: no-cache
Cache-Control: no-cache
这篇关于我需要做什么来使Excel通过HTTPS访问Web查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!