Way for user to see progress on long running asp.net process

R

Ralph

Okay I have a website where the user is going to hit a button to kick
off a process that is going to take a long amount of time.
Is there anyway without using AJAX, or possibly a windows control on a
page that connects to a webservice to show the user the progress of
this operation.
It seems almost a given that I must use either ajax or some kind of
control to do this.
Any suggestions would be greatly appreciated.

So far I have come up with two non Ajax/winforms controls solutions.
1) when user clicks button call both the server and the client events.
in the client event call another aspx that actually runs the page via
a popup.
Can tell user they must have popups enabled. Not writing this app for
the world.
In my server code simply call another page that uses javascript
timeout, to call its self every 10 to 30 seconds to read values put in
the session by the process and display status to user.

2) would be launching the process in a thread.
I have always shied away from threads in a web app.
Use them in winforms, windows services, just was never shure what the
behaviour of a thread would be in a web app. Does anyone have any
experience using threads in a web app.

Any advice or suggestions would be greatly appreciated.




Thanks in advance

Ralph
 
T

Thomas Hansen

Okay I have a website where the user is going to hit a button to kick
off a process that is going to take a long amount of time.
Is there anyway without using AJAX, or possibly a windows control on a
page that connects to a webservice to show the user the progress of
this operation.
It seems almost a given that I must use either ajax or some kind of
control to do this.
Any suggestions would be greatly appreciated.

So far I have come up with two non Ajax/winforms controls solutions.
1) when user clicks button call both the server and the client events.
in the client event call another aspx that actually runs the page via
a popup.
Can tell user they must have popups enabled. Not writing this app for
the world.
In my server code simply call another page that uses javascript
timeout, to call its self every 10 to 30 seconds to read values put in
the session by the process and display status to user.

2) would be launching the process in a thread.
I have always shied away from threads in a web app.
Use them in winforms, windows services, just was never shure what the
behaviour of a thread would be in a web app. Does anyone have any
experience using threads in a web app.

Any advice or suggestions would be greatly appreciated.

First of all you must use some sort of Ajax to solve this.
The way I would have done this (using Gaia Ajax Widgets at http://
ajaxwidgets.com) is by:

First have a gaia:Button which when clicked would trigger my server
side event handler.
Then within that event handler I'd create a new thread that oes the
working.
Then I'd have a gaia:Timer which I would ENABLE in that same event
handler, maybe poll every 3 seconds or something...
Then within the "tick" event handler for my timer I'd update another
gaia component, maye a label or maybe a gaia:DynamicImage
or something according to how many percent the long task had come...

Now if you want to make it REALLY cool you'd have your "percentage bar/
label/whatever" in a modal gaia:Window which then would obscur the
other controls you have on your page
and forcing the user to actually wait for the process to finish before
he can interact with any of the other controls on your page...

Gaia is downloadable for free (no restrictions at all) at http://
ajaxwidgets.com
Though the free version forces a VERY small link in the upper right
corner of all the pages you stuff Gaia controls onto...

Regarding using threads in web apps, I think there's no problem...
I believe the only reason people have "shielded" themselfs from using
them is that before Ajax there really was no POINT in doing it...
Though I think the max limit of threads pr. process for Windows Server
2003 is 32000 or 64000 or something...
If you expect to get more than 16000 simultanous users using that
logic I think you'll have to fill in with more iron...


..t
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top