I have a web service method that asyhcronously calls a long-running function,
using BeginInvoke, passing a callback delegate. So the client calls the web
method, which makes an asynchronous call to another function, then returns to
the client.
The asynchronous call is a data-processing function which takes anywhere
from 5-10 minutes to complete. During the life of the call, the function
calls other methods on the web service to report progress.
1. Is this basic approach a sound one to achieve multi-threaded processing?
Are there any "gotchas" I should be aware of?
2. I noticed that HttpContext.Current is null in the called function. That
makes sense because the web method call has completed and gets destroyed. I
assume that if I pass a HttpContext.Current to the called function, it will
not be destroyed until the call releases it. Would this be safe to do?
--
Eric Richardson