Dealing with Long running tasks in ASP.NET app

  • Thread starter Thread starter LP
  • Start date Start date
L

LP

Hello,

I am supporting one ASP.NET application. A web form in this application
updates records in SQL Server db through a SP. Usually this SP doesn't take
more than 5 sec, but time to time it slows down to 1 to 5 min. Then DBA does
some "magic" with indexes and it goes back down to 5 sec. again.
I want to overhaul a code-behind class, so when updates happen it starts a
new thread and then somehow "sends" update status to the user. I realize
this design is not the best solution or is it? and so many things can go
wrong if that thread fails, and I have no idea how to notify the user when
update completes, etc...
Has anyone had to deal with this kind of situation? How as it handled, what
is the best solution for this problem?

Thank you
 
Google "ASP.Net Progress". Tons of info available.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
Thanks.

The problem is this application is "Record Review" application, after 1
record is updated, move to the next one. So I am not sure if progress bar is
a good idea. I was thinking update one record but move to the next one
without waiting for update to finish. If that makes sense?
 
new thread and then somehow "sends" update status to the user. I realize
It's the same principle, whether you use a Progress bar or simply notify the
user when the process is finished. The principle is that the client must
poll the server (PostBack) to figure out whether or not the process has
finished, or must spit out HTML in chunks at a time until the process is
finished.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
Back
Top