asyncronous call times out before finishing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

On my .NET web project I am trying to make an asyncronous call to a function
using IAsyncResult. The function will process for about a 1/2 hour. before it
completes, the process abruptly ends as though it has timed out. I'm not sure
what is timing out. Would it be the page I am making the async call from? Or
possibly the connection/command objects I am using to connect to my sql db?
 
the process abruptly ends as though it has timed out

How do you know it's timing out and has not just finished processing?

If you are starting the async process from a Request in an ASP.NET application by using a Begin* method, and later calling an End*
method, the End* will block execution on the Request thread until the async process completes. This, of course, may cause the
Request to timeout since the client will not receive a response until the async operation has completed.

You can prevent this by using QueueUserWorkItem on the ThreadPool class instead of using a Begin* method, or you can create a
background Thread to do the job. Either way, the client will receive a response while the server continues processing
asyncronously.

hope it helps,
 
Back
Top