0

I've created an aspx page which contains options for configuration of the final operation, the final operation on this page requires it to create backups of a number of folders; this can take a while.

Upon clicking the start button, it currently starts a timer which reads a log file (updated by the backup processes) from the system and periodically outputs this to a multi-line text box on the webpage. However, as the backing up process can take a while, this textbox does't get updated until the backup has been completed.

I just want to know, what's the best way to approach this I've been considering the following:

  1. Webservice - As it's on the same server is this worth it? Also will this run the longer processes, allowing the timer to continue working?
  2. Javascript to read the logfile and keep the textbox updated?

This is all on 1 server, it's just accessed/managed via this webpage.

1 Answer 1

1

Moving the long running operation outside the web application is a good practice, it can save threads for processing web requests. The web service is worth it, the web method of the web service that triggers the operation could run the operation on a new thread and return (fire and go). The web application could query a DB table for status (progress, result, error message) of the job.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.