aspx page to kick off async background task and then end

Discussion in 'ASP General' started by Carl Johansen, Jul 2, 2005.

  1. I'm not sure of the best way to do what I want. Users of my website want to
    run reports that take a long time to generate. This is what I would like to
    happen:

    1. User requests aspx page
    2. aspx page kicks off an asynchronous background task (on the same web
    server) to generate the report. The end result will be a file created on
    the website.
    3. aspx page returns this message to the user: "your report is being
    generated, check back in a few minutes"
    4. aspx page ends.
    5. (optional, the icing on the cake) A frame in the user's frameset starts
    (through client-side script) sending periodic requests to the server to
    check whether the report is ready, and displays a message box to inform the
    user when they can pick it up.
    6. User goes to their "My Reports" page and collects the report
    7. After 24 hours the report file is automatically deleted from the server

    Now, my question is how to do step 2. I guess it could be done with MSMQ,
    but is there a better way? I tried making a Windows service and making an
    asynchronous call to it with Delegate.BeginInvoke(). However, it doesn't
    seem suited to my situation because it seems to insist that the caller (the
    aspx page) stays alive for the end result, whereas I want the caller to
    terminate while the callee is still running. When my BeginInvoke() caller
    terminates, the callee seems to stop also. Additionally, the documentation
    says the caller must call EndInvoke(), which mine can't.

    Am I on the right track, or should I be using MSMQ? Shelling? A web
    service? Some kind of ThreadPool? So many technologies...

    Thanks in advance,
    Carl Johansen
    http://www.carljohansen.co.uk
    Carl Johansen, Jul 2, 2005
    #1
    1. Advertising

  2. Carl Johansen wrote:
    > I'm not sure of the best way to do what I want. Users of my website
    > want to run reports that take a long time to generate. This is what
    > I would like to happen:
    >
    > 1. User requests aspx page


    There was no way for you to know it, but this is a classic asp newsgroup.
    While you may be lucky enough to find a dotnet-knowledgeable person here who
    can answer your question, you can eliminate the luck factor by posting your
    question to a group where those dotnet-knowledgeable people hang out. I
    suggest
    microsoft.public.dotnet.framework.aspnet.

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Jul 2, 2005
    #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. greg
    Replies:
    2
    Views:
    707
    Scott M.
    Aug 27, 2004
  2. Carl Johansen
    Replies:
    3
    Views:
    933
    Carl Johansen
    Jul 3, 2005
  3. rodchar

    kick off batch sproc

    rodchar, Aug 1, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    254
    rodchar
    Aug 1, 2008
  4. loial
    Replies:
    2
    Views:
    289
    Nobody
    Jul 20, 2010
  5. Sebastian W.

    Net::SSH - kick off background job

    Sebastian W., Dec 17, 2008, in forum: Ruby
    Replies:
    7
    Views:
    132
    Douglas Seifert
    Dec 20, 2008
Loading...

Share This Page