Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running long process in background

Status
Not open for further replies.

JGresko

Programmer
Apr 24, 2002
86
0
0
US

I have an ASP.NET web application that needs to allow the user to start a long process to perform complex calculations and create/manipulate database records.

-- I need to allow a user action to start the process from a
form where needed input parameters are supplied.

-- I'm planning on updating a field in the database when
the process starts to indicate the process is 'in process'.
(i.e. 0 not started, 1 in process, 2 done )

-- After setting the flag I need to either 'disconnect' from the process to let the user do other things
OR
--Alternately, I could supply an status screen and update it every (?two minutes?) to let them know how it's progressing

Is there a way to put the process in a stand alone class or server side executable and then execute it? OR
Is there a way to put the code in a module and force updates to the screen at given intervals.

Comments on the best approach &/or code examples (in VB) greatly appreciated.

Thanks!
 
The easiest might be to write a windows service.

For instance, your asp.net app saves some parameters to a database table. A windows service on the web server is set to run every so often, and it checks the fields in the database table. If it finds new parameters, then it runs whatever process you need on them.

That way, the process does get run, and your users can continue to navigate around the web app.

D'Arcy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top