eWorld.UI - Matt Hawley

Ramblings of Matt

Async Call to WebService

July 16, 2004 23:53 by matthaw

So I ran into a bit of a problem this afternoon when calling WebServices asynchronously. It seems that if the process that calls the webservice ends right after you call the web service asynchrously, the process stops the async call and never makes that call.

I know this to be the case because I did several different tests, one calling the method async, then doing a wait on the IAsyncResult. I also did a long loop afterwards...both of which worked just fine. It seems that since the process ends, it cuts off the async call.

Anyone have any insight on this problem?

Categories: .NET
Actions: E-mail | Permalink | Comments (2) | Comment RSSRSS comment feed


July 17. 2004 05:52

Make sure that you call the endInvoke() method for your request.  In 1.1 it is now the fact that the CLR will be expecting you to do the clean up other there will be reseources with held until...  So ialways create a callback method and process my endInvoke() there and I have thousnds of calls execute where the final step is to "fire and forget."

Just my two cents...




July 20. 2004 09:56

We had problems with this, too. It didn't seem to return immediately. We ended up just spinning off another thread to call the webservice synchronously, and that's worked well. So ours  asynchronous on the calling side as opposed to asynchronous on the webserver side, but the end result (at least in our use case) is the same.

jon_galloway@yahoo.com (Jon Galloway)

Comments are closed

Copyright © 2000 - 2021 , Excentrics World