Mark wrote:
I'm building a web utility to do some processing that will run for several
hours. Assume I have a valid reason for using the web for the utility.
During the process I'd like to display an update on the job's status while
not stopping the process that is running. It does not need to be pretty.
I'd be quite happy with a quick Response.Write("Job has finished consuming
300 of 9356 bananas"); or similar. I don't care if the message is replaced
or appended to.
What is the easiest (doesn't need to be pretty on the UI) method for posting
information back to the page while continuing to process?
Thanks!
Mark
Hi Mark,
One of the simplest solutions for this is to have the web application
trigger a standard application, i.e. a command line application on the
server, which will actually do the processing for you. You could then
refresh a web page every few seconds, or minutes, which will check for
an indicator that the processing is complete.
The command line application, in this situation, could write a simple
text file to a directory to indicate that it has finished.
There are problems with this solution, i.e. what happens if the
application is launched more than once. I used to run a similar set up
some years ago for live reports that took 10 minutes or so to complete.
The web application fired off a PERL script that did the processing,
while the web page checked for the existance of a named file. The file
name was was made up with a unique identifier and this name was passed
to the PERL script so that any one running the report would see their
version. Not ideal but it did the job at the time.
Hopefully this will give you some pointers as to what you might be able
to achieve.
Steve