开发者

HttpCachePolicy and SSL

开发者 https://www.devze.com 2022-12-10 05:46 出处:网络
I have an application that allows the user to download a csv. This works great when not using SSL. However, when using a secure connection I get the \"Internet Explorer was not able to open this Inter

I have an application that allows the user to download a csv. This works great when not using SSL. However, when using a secure connection I get the "Internet Explorer was not able to open this Internet Site". I know that the problem has to do with my HttpCaching policy. The following MS Support document explains the issue: http://support.microsoft.com/kb/316431 However, I cannot seem to get it to work. Any ideas?

HttpCachePolicy cachePolicy = Response.Cache;
        cachePolicy.SetCacheability(HttpCach开发者_运维百科eability.Private);
        cachePolicy.SetNoStore();
        cachePolicy.SetMaxAge(new TimeSpan(0L));
        cachePolicy.SetRevalidation(HttpCacheRevalidation.AllCaches);

I have tried a combination of different HttpCacheability types.


I found that clearing the headers before explicitly setting the Cacheability resolved this issue.

Response.Clearheaders();

0

精彩评论

暂无评论...
验证码 换一张
取 消