Avoiding missing include file error

D

Des Perado

We have an elderly DOS-based system running on a Novell Netware server here,
and an extensive intranet. Quite recently the board decided that some
crucial info from the DOS system was to be made available to senior
management via the intranet. After some initial design problems (OK, after
severely scratching our heads at the HOW? question) we were quite pleased
with our solution: a background process in the DOS system gathers the data
and creates four include files, containing not only the stats but also some
of the HTML formatting, then shells to a DOS FTP command to get them to the
web server, and this all happens every 60 seconds. At the client end an ASP
page calls the four includes into a static page and displays the info, with
a meta refresh, also every 60 seconds. It's essential that up to date info
is displayed with one-minute resolution.

This works better than we could have hoped except for one little random
oddity: if a client instance just happens to refresh at the exact
millisecond that the FTP process is taking place we see an ASP 0126 error
and "The include file 'addition.inc' was not found". Hitting F5 reloads the
whole page of course, and we may not see the error again for hours. The
include files are so tiny that the FTP process is over within literally
milliseconds.

It's the last remaining untidiness in the system, and I was wondering if
anybody could suggest a way to avoid the error. I would rather see a blank
portion of the correct web page than a white error screen.

Thanks for reading this.
 
A

Aaron [SQL Server MVP]

If the .inc file doesn't include any ASP code, you could consider a couple
of approaches:

(a) use FileSystemObject to determine the file's existence, then read the
content in and response.write it, instead of using the pre-processor
#include directive
(a) ii. keep a copy of the file locally to use as a backup
(b) keep the file on a reliable server that is not prone to this weird
refresh issue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top