【问题标题】:Firefox 4 and WCF Data Services etag exceptionsFirefox 4 和 WCF 数据服务 etag 异常
【发布时间】:2011-04-22 16:17:19
【问题描述】:

我们的网站上有几个使用 WCF 数据服务运行的 Silverlight 4 应用程序。我们的 QA 团队刚刚安装了 Firefox 4,当应用查询服务时出现异常,但它在 IE 8 和 9 甚至 Chrome 中运行良好。

使用 FF4 时服务的异常是:“在请求标头之一中指定的 etag 值 '""' 无效。请确保仅指定了一个 etag 值并且有效。”

在url中浏览服务时,ctrl+F5有效,F5无效。

很遗憾,WCF 数据服务没有考虑到这一点。什么是解决方法?

【问题讨论】:

    标签: wcf silverlight-4.0


    【解决方案1】:

    像这样将可缓存性设置为 NoCache:

    protected override void OnStartProcessingRequest(ProcessRequestArgs args)
    {
        base.OnStartProcessingRequest(args);
        HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
    }
    

    jorj

    【讨论】:

    • 我们后来发现我们可以删除这一行并将该目录的 IIS 设置更改为从不缓存。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多