WCF-RIA 服务客户端输出缓存 - 不适用于 IE 与本地主机 [英] WCF-RIA Services Client OutputCache - not working in IE with localhost

查看:19
本文介绍了WCF-RIA 服务客户端输出缓存 - 不适用于 IE 与本地主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在项目中使用 WCF-RIA 服务.部分是搜索将在服务器上触发 RIA 请求.

We are using the WCF-RIA Services in our project. On part is a search which will trigger a RIA request on the server.

对于这个请求,我们使用这个属性启用了客户端输出缓存:

For this request we have enabled the Client output cache using this attribute:

[OutputCache(OutputCacheLocation.Client, duration: 2 * 60)]

我们要使用客户端缓存,因为要缓存的信息是特定于用户的.问题是,在 IIS 中安装应用程序后,缓存在 Firefox 和 IE 中工作正常,但在调试 IE 时似乎忽略了缓存.

We want to use the client cache, because the information to be cached are user specific. The problem ist, that the cache works fine in Firefox and IE after the application is installed in an IIS, but while debugging IE seems to ignore the caching.

也许这不是真正的 RIA 服务特定问题,而是 IE 问题.看起来 IE 看​​到嘿,这是对本地主机的请求,我不想缓存它"(某种功能).

Maybe this is not really a RIA Service specific problem but more of an IE problem. It looks as IE sees "Hey, this is a request to localhost, I don't want to cache that" (some kind of feature).

这有点无济于事,因为调试情况与现场"情况不同.

This is a bit unhelpful, because the debugging situation is not the same as the "live" situation.

有没有办法在调试时在 IE 中使用 WCF-RIA 服务客户端缓存?

Is there a way to use the WCF-RIA Services client cache in IE while debugging?

推荐答案

您应该能够使用 URL 中的机器名称或使用 localhost 来测试这个.(注意末尾的点)而不是 localhost.请参阅此处了解更多信息.

You should be able to test this using either your machine name in the URL or using localhost. (note the dot at the end) instead of localhost. See here for more info.

使用 Fiddler 后,您应该能够查看缓存是打开还是关闭并进行调试.

Once you have it working with Fiddler you should be able to see if your caching is on or off and debug it.

这篇关于WCF-RIA 服务客户端输出缓存 - 不适用于 IE 与本地主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆