How to prevent 404 error when a page is updated via ftp?

R

Robm

Hello,

In my FP2000 web I use a link to a htm file in a non-published subweb. This
file is auto-refreshed once a minute by means of the meta tag: <meta
http-equiv="Refresh" content="60">. The file is also overwritten once a
minute via ftp. The idea of course is to get a real-time data display. The
problem is that if the refresh comes while the file is being updated, a 404
error is produced. Any idea how to prevent or handle this?
 
J

Jim Buyens

I would avoid displaying the automatically FTP'ed
directly. Instead, I would write an ASP or ASP.NET page
that read the file from the server's file system and
transmitted it to the Web server.

This provides a way that you can trap the error and then
supply alternate content, or retry for a little while at
some frequency. For example, you could retry at 5, 10,
and 15 seconds following an initial failure.

It might also help for your FTP process to first upload
the new file to a temporary name, then delete or rename
the old file, then rename the new file. This shortens the
window when the file is unavailable.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
R

Robm

Thanks. I already tried to reduce the time by ftp-ing to a .tmp file and
then removing the original and renaming the .tmp file. Even so I find that
the page is unavailable for too long a time. I had this working originally
as a Visual Interdev web site, with a database connection to the data
server, but my customer doesn't allow this any more. Why would the page be
unavailable for such a long time (multiples of tens of seconds)? The file
size is under 4K!
 
Top