How can I end the HTTP response but continue executing ASP?

Discussion in 'ASP General' started by boole, Feb 15, 2008.

  1. boole

    boole Guest

    Hi there, when my ASP page receives the client request, I want to
    gather the request data (form), promptly end the response to the
    client (successful) and continue doing what I need to do with the
    data, the result of which does not affect the response, hence why i
    don't want to waste time leaving the connection open or keeping the
    client waiting, I suppose you could call the client request a
    "trigger".

    I do not mind using ASP functions to fork, therad, execute or using
    the buffer, whatever works... but I am very new to ASP/VBScript so I
    do not know how to do this, and I think the Response.End will end ASP
    execution, and I am not sure how to end only the HTTP response using
    the buffer.

    I don't want the client request to time out, I do not know the clients
    time out settings.

    I am not even sure if it is possible, perhaps it is a requirement of
    ASP that the client waits for all ASP to execute, but there must be
    some way, even using system calls or something to do this.

    Thanks, George.
    boole, Feb 15, 2008
    #1
    1. Advertising

  2. boole

    boole Guest

    I would like to add, if I could somehow execute another ASP page from
    the receiving page, telling it not to wait for execution to finsh
    (like a fork), that would be ideal.
    boole, Feb 15, 2008
    #2
    1. Advertising

  3. "boole" <> wrote in message
    news:...
    > Hi there, when my ASP page receives the client request, I want to
    > gather the request data (form), promptly end the response to the
    > client (successful) and continue doing what I need to do with the
    > data, the result of which does not affect the response, hence why i
    > don't want to waste time leaving the connection open or keeping the
    > client waiting, I suppose you could call the client request a
    > "trigger".
    >
    > I do not mind using ASP functions to fork, therad, execute or using
    > the buffer, whatever works... but I am very new to ASP/VBScript so I
    > do not know how to do this, and I think the Response.End will end ASP
    > execution, and I am not sure how to end only the HTTP response using
    > the buffer.
    >
    > I don't want the client request to time out, I do not know the clients
    > time out settings.
    >
    > I am not even sure if it is possible, perhaps it is a requirement of
    > ASP that the client waits for all ASP to execute, but there must be
    > some way, even using system calls or something to do this.
    >


    > I would like to add, if I could somehow execute another ASP page from
    > the receiving page, telling it not to wait for execution to finsh
    > (like a fork), that would be ideal.


    Since you are new to ASP is there anyway you can skip ASP altogether and
    simply use ASP.NET instead? In ASP.NET its fairly straight forward to
    instance a new thread to do your processing whilst allowing the response
    handling thread to complete.

    In ASP/VBScript (or any script for that matter) this sort of thing is not
    possible.

    My stock suggestion is to place the data you need for you processing in a
    temporary DB table or in an XML file. You can then have a scheduled task
    monitor the table or folder where the XML is placed and have it process the
    record. If you prefer you could have it post to an ASP page telling it what
    record or file to process.

    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Feb 16, 2008
    #3
  4. "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot com> wrote in message
    news:...
    > you may want to place your processing code into a COM script component.
    >
    > learn more here:
    >
    > http://www.microsoft.com/mspress/books/sampchap/1394b.aspx
    >
    >



    That in itself won't allow the ASP script to return to the client before
    processing is complete.
    Calls into a component from ASP are synchronous. A compiled component can
    obviously use an additional thread to continue processing whilst allowing
    the called to thread to return. However coding this properly involves
    considerable complexity.


    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Feb 17, 2008
    #4
    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. Sampriti
    Replies:
    4
    Views:
    2,449
  2. Neo Geshel
    Replies:
    2
    Views:
    3,604
    Versteijn
    Aug 18, 2004
  3. csgraham74

    Response.Redirect at a response.end

    csgraham74, Jun 16, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    876
    Karl Seguin
    Jun 16, 2005
  4. Replies:
    9
    Views:
    4,732
  5. Niclas
    Replies:
    0
    Views:
    346
    Niclas
    Apr 4, 2006
Loading...

Share This Page