Forum Moderators: open

Message Too Old, No Replies

IIS Cacheing asp pages

IIS cache asp page. Might be cause by SFU

         

karazy

9:31 am on Feb 20, 2004 (gmt 0)

10+ Year Member



Hello everybody,

Can somebody please help me.

I have a Windows 2000 server (SP 4 installed) with IIS 5 and Services for Unix 3.5.
My clients FTP to the webserver through a Unix box and are NFS mounted to the Windows box.

Now when you edit an ASP page by overwriting it the changes don't show up when you view the page. It seems that IIS doesn't relise that the file has been modified and is showing a cached version.

But if you rename the file or delete the old copy and then upload the file IIS see's that the file is different and displays correctly.

I have tried to edit the site properties and turned off "Cache ISAIP applications".
I have tried to turn off "HTTP Keep Alives Enable"
I have tried to turn on "Enable Content Expiration"
I have tried to add a custom HTTP Header "Cache-Control: no-cache"

and now I have run out of ideas and can not find any more information about this.

Could it be a problem caused by services for unix. Why Doesn't IIS relize that the file has been changed. It knows when you upload a new file. Or even if you rename the file (all done via FTP via SFU NFS mount)

Xoc

2:43 am on Feb 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm guessing that the problem is with the cache in your web browser, not with IIS. Can you confirm for sure that is the case by using Opera or Mozilla instead of IE?

duckhunter

9:26 pm on Feb 21, 2004 (gmt 0)

10+ Year Member



Xoc is right. You can force the browser to reload the page everytime by putting the following in your <HEAD> of each page.

<meta http-equiv="Pragma" content="no-cache">

karazy

1:20 am on Feb 23, 2004 (gmt 0)

10+ Year Member



Yes I have tried different browsers and from different machines.

Like I stated before. When you rename or delete the original file first IIS will notice that the file has changed.

Also if I FTP directly to the windows box (not through Services for Unix) and make the changes then they show up strait away.

But if I ftp through my unix box. Like my clients have to do then the changes wont show up.

duckhunter

2:21 am on Feb 23, 2004 (gmt 0)

10+ Year Member



Are your users behind a proxy server or firewall that may be caching content?

karazy

2:41 am on Feb 23, 2004 (gmt 0)

10+ Year Member



Nope no proxy or firewall that would be caching the page.

As I understand it IIS caches the page. But I thought that turning off "Cache ISAIP applications" stops that.

If I restart IIS it sees the modified files.

I have also been reading somewhere in IIS you can turn off asp pages cacheing... but it must be for a different version of IIS.

EDIT: I have found where to turn off ASP page caching. It is under the global setting for IIS. You can't turn if off per site.

But this is not an ideal fix as the modified page seems to disappear(The page cannot be found error message) for about 5 seconds. But then appears with the modifications made.

Must be a bug with SFU.

duckhunter

5:19 am on Feb 23, 2004 (gmt 0)

10+ Year Member



What happens if your WinFTP the file instead of via Unix? There could very well be an OS Function that must run to translate the new file. Which is probably a lower priority process than IIS serving clients.

I've never had a moments delay in IIS showing new versions of pages. 5 seconds is a long time unless the server is overworked or the file is "in use".

karazy

5:40 am on Feb 23, 2004 (gmt 0)

10+ Year Member



>What happens if your WinFTP the file instead of via >Unix? There could very well be an OS Function that >must run to translate the new file. Which is probably
> a lower priority process than IIS serving clients.

The file is updated immediately.

karazy

5:56 am on Feb 23, 2004 (gmt 0)

10+ Year Member



While testing I have found some strange things.
This is what I am doing.

I am running two ftp connections at the same time.

Connection 1 -> Through SFU mounting to a directory on the windows server.

Connection 2 -> Directly to the windows server

Also remote desktop to the server to check what is actually there.

If I make a change on connection 1 The change now take about 5 seconds to show on the website. In that 5 seconds the browser says the page can not be found.

If I open the page to edit via connection 2 it is showing the old version even though the site is now showing the new version.

I confirm that the modification has taken place via Remote desktop.

Then if i wait about 10 seconds and edit the page via connection 2 again it will show the updated version

It seems to me that SFU is not talking to Windows correctly as IIS is not seeing the changes.

All I can think of is IIS controls FTP and is giving the older version of a page.

If I make the changes via connection 2 the changes are showing strait away. No 5 second delay.

duckhunter

6:06 am on Feb 23, 2004 (gmt 0)

10+ Year Member



Definitely a bridge in there it's having to cross that Windows-to-Windows transfers don't require. I'm not a Unix guru so that part is a little out of my realm.

karazy

6:21 am on Feb 23, 2004 (gmt 0)

10+ Year Member



well it's working.... kind of... not the best way.... but will have to do for now....

Thanks for all your help duckhunter.