Friday, September 19, 2008

Simple problem, and not so obvious solution

Hello,

I have abandoned this blog, but it seems that nothing is ever abandoned on the internet :)
Apparently one of my posts actually helped.
And there was also one comment, that I have seen too late to help (sorry Kiran, hope you solved the problem).
So I am going to continue posting new interesting solutions, to some nasty problems.

Here we go...
PROBLEM:
You are using dsoFramer.ocx control to host some fine Microsoft office documents on your web page. Everything is going excellent, you find out even how to download files directly from web address into dsoFramer, and then, you Publish project to working environment, and THE problem start....
You download some files from web server to client in IE using dsoFramer.ocx control, but it seems that IE reloads files from cache.... you change files on local machine, upload it.... you try to do download... but it appears that files are read from Temporary Internet Files directory!

SOLUTION:
(Too simple to be true... but after you clear Temporary Internet Files directory on test client(s) [clear cached data] , and apply following tip in IIS... you will solve problem )
For IIS5.1 (standard XP sp2)
Go to Internet Information Services.... open directory where your files are kept (files that are downloaded to client). Right-click ... properties.... Http Headers...
add to CustomHeaders, following:

Custom Header Name:
Cache-Control
Custom Header Value:
no-cache

On IIS 7... Instead of HttpHeaders, try Http Response Headers, it should work.

Also, if somebody has problem with dsoFramer.ocx control, let me know.