FDF Toolkit 6, SSL, ASP.NET 2.0 Handler, and Internet Explorer cannot display the webpage

We run into an interesting problem today while working with FDF Toolkit 6 inside ASP.NET 2.0 HttpHandler. Internet Explorer 7 refused to open a pre-populated PDF form produced by the handler when communicating with the server over SSL.

We could see data coming to the client and AcroRd32.exe starting... however the browser continued to display "Internet Explorer cannot display the webpage" message. The same code worked well in IE without SSL or in FireFox with or without SSL.

The problem was related to caching. For some reason, any of the lines below cause IE not to be able to open an FDF form:

context.Response.CacheControl = "no-cache";
context.Response.AddHeader("pragma", "no-cache");

Removing these lines fixed the problem. Happy coding!

Welcome to ModelBlog

Thank you for visiting ModelBlog. We hope the time you spend with us will be both entertaining and worth your while. Have fun!