To help with performance of the clients, I offload the processing of a request onto a task. This is done because the processing usually takes a bit of time, and I don't want the clients to be waiting for a while just to get the 200 response. The web service that offloads the work onto a task is always processing posts.
public void ProcessRequest(HttpContext context)
// check for bad requests -- return 400
// get copy of the context input stream
private void ProcessRequest(Stream inputStream)
// process input stream
// any server error that would normally result in 500 response are not
// exposed to the clients, the clients are to see 200 when the server
// encounters an error
When IIS recycles, it waits for all that threads to finish and exits - up to the timeout value that have on pool. After that time out they kills all running threads and start again.
So you may set a signaling to your threads to stop when the application request to shut down at
globa.asax using the