views:

53

answers:

1

Hey everyone,

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(HttpCacheability.Private);
        cachePolicy.SetNoStore();
        cachePolicy.SetMaxAge(new TimeSpan(0L));
        cachePolicy.SetRevalidation(HttpCacheRevalidation.AllCaches);

I have tried a combination of different HttpCacheability types.

A: 

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

Response.Clearheaders();

Nick