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

B

boole

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.
 
B

boole

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.
 
A

Anthony Jones

boole said:
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.
 
A

Anthony Jones

Jon Paal said:
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.
 

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,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top