473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Dealing with Long running tasks in ASP.NET app

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
Nov 19 '05 #1
4 1211
Google "ASP.Net Progress". Tons of info available.

--
HTH,

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

"LP" <lp@a.com> wrote in message
news:ek**************@TK2MSFTNGP15.phx.gbl...
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

Nov 19 '05 #2
LP
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?

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:O1*************@TK2MSFTNGP12.phx.gbl...
Google "ASP.Net Progress". Tons of info available.

--
HTH,

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

"LP" <lp@a.com> wrote in message
news:ek**************@TK2MSFTNGP15.phx.gbl...
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


Nov 19 '05 #3
> > 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...

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.

"LP" <lp@a.com> wrote in message
news:e7**************@TK2MSFTNGP09.phx.gbl... 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?

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:O1*************@TK2MSFTNGP12.phx.gbl...
Google "ASP.Net Progress". Tons of info available.

--
HTH,

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

"LP" <lp@a.com> wrote in message
news:ek**************@TK2MSFTNGP15.phx.gbl...
> 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
>
>



Nov 19 '05 #4
> > 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...

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.

"LP" <lp@a.com> wrote in message
news:e7**************@TK2MSFTNGP09.phx.gbl... 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?

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:O1*************@TK2MSFTNGP12.phx.gbl...
Google "ASP.Net Progress". Tons of info available.

--
HTH,

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

"LP" <lp@a.com> wrote in message
news:ek**************@TK2MSFTNGP15.phx.gbl...
> 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
>
>



Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bob Murdoch | last post by:
I'm developing an intranet application using W2k server and IE5.5 - 6.x clients. I've got one particular function that calls a stored procedure to update a number of records, depending on user...
13
by: BK | last post by:
Can someone point me to a code sample that illustrates executing long running tasks (asynchronous) from a web application in ASP.NET? I assume that Web Services might come into play at some point,...
32
by: John Wright | last post by:
I have a long process I run that needs to be complete before the user can continue. I can change the cursor to an hourglass, but I want to update the Status Strip on the bottom during the process. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.