I'm trying to fire off several HTTP requests from an ASP.NET page. The page itself doesn't need to know the response and should continue processing & deliver the page regardless.
I've tried putting the HTTP code in a BackgroundWorker and running it asynchronously, however I initially got the following error;
Asynchronous operations are not allowed in this context. Page starting an asynchronous operation has to have the Async attribute set to true and an asynchronous operation can only be started on a page prior to PreRenderComplete event.
So I did as I was told and gave the page the Async attribute. I then did some research and discovered that my BackgroundWorker isn't actually performing an asynchronous operation as I expected. Some background reading (http://www.pluralsight-training.net/community/blogs/mike/archive/2005/11/04/16213.aspx) informed me that;
PreRender and PreRenderComplete events [do] not resume until all of the timeout event handlers for all of the registered async tasks have been invoked and return.
How do I ensure that my BackgroundWorker does not suspend the processing of the page?