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

Discussion in 'ASP .Net' started by Ralph, Feb 4, 2007.

  1. Ralph

    Ralph Guest

    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
    Ralph, Feb 4, 2007
    #1
    1. Advertising

  2. On Feb 4, 2:35 pm, "Ralph" <> wrote:
    > 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

    --
    http://ajaxwidgets.com
    Free ASP.NET Ajax Widgets NOW!
    Thomas Hansen, Feb 4, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anonieko Ramos
    Replies:
    0
    Views:
    529
    Anonieko Ramos
    Apr 14, 2004
  2. =?Utf-8?B?SW1Tb0xvc3Q=?=

    Running Long Process From ASP.NET

    =?Utf-8?B?SW1Tb0xvc3Q=?=, Dec 29, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    3,081
    Edwin Knoppert
    Dec 30, 2005
  3. Anonieko
    Replies:
    1
    Views:
    21,255
    ElronVel
    Feb 4, 2006
  4. cindy
    Replies:
    16
    Views:
    2,091
    cindy
    Jul 16, 2009
  5. Replies:
    4
    Views:
    238
    Dave A.
    Jun 24, 2005
Loading...

Share This Page