Reload of new page (RTF) gives old version


I use windeows 2000 server with IIS and ASP. This works quite good.

However, some of the documents generated need to be printed in an exact way by the users. To have a full control over this proces, they are generated in RTF format.

We give them the extention .RTF or .DOC

We have set server extentions so that these formats are handled by the ASP interpreter.

Each time the document is called, it is (or should be) generated on the fly, including a time-stamp.

We set the appropriate settings so that if a user calls those documents, on his machine MS WORD opens and he can print from there.

We have one problem however. If we call the document with the same document name repeatedly, we have most of the time an old version.

We are sure there is no proxy between server and the client on which we test. On the client we make sure caching is off.

What can be done in order to make sure that every time the document is generated again and in the last version send to the clients.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

strange. no idea what the reason is. how about using filenames containing date and time and passing them to the client ?
Two questions came to my mind when reading your problem. Please answer these.

See the process flow as an example.

a. RTF file is generated.
b. File is saved as a file on the server (probably with the same filename)
c. A redirect is issued to the page so that the file is opened in the browser window. (possibly redirect to the actual RTF file itself)
d. Displays the old file.

If you are setting the Expire Immediately option in IIS, IIS will not download the latest RTF and might lead to display the old filename as the cache is already present.
See what microsoft says in this regard:

I would suggest you to give a 3-5 minutes expiration time instead of forcing it to expire immediately
How to setup the Cache setting on IIS :

The questions are:

1. Are you able to download the latest file if copied to a folder which has directory browsing enabled?
2. Are you still able to see the old version of the file if the local cache is cleared?
3. I am sure you might have done this, but is it possible to have the timestamp used as the filename - say "myfilename-050406-1100.rtf" or something.

Please try the above solution and see if you can answer the questions, so that I can be off help for you further.




Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
infexAuthor Commented:
The way you describe is what we did before : generate an RTF file, always with a new name and then automatically redirect the browser to that page whereby the generated pages were removed in batch once a day.

This systems works.

However, we now want to work a different way : an ASP file is given the extention .DOC or .RTF

As we know only the RTF format, no matter which extention we give RTF is generated by the ASP upon calling.

We did set in IIS the necessary settings so that if through the web a file with extension .RTF is called, the concerning ASP page is handled by the ASP interpreter (even if it has the extention .RTF). So no file is made on the server.

The generated RTF is send to the browser, which sees it is to be handled by MS Word and displayed by word.

This goes the first time. However, we are not able to ensure that the users have always the last version.

Apparently we can not use a "response expires" in RTF. The problems seems to be located at the client side.

As the .RTF is in reality a .ASP file on the server side, we can not give it always an other name.

How make sure it is always correctly reloaded?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.