Tuesday, February 14, 2012 1:20 AM
In System.Web.Services.Protocols.SoapHttpClientProtocol, there is two method "BeginInvoke ","InvokeAsync". Looks like all used to call webservice asynchronism. But what's the different for them?
Tuesday, February 14, 2012 9:02 AM
1. Begin Invoke is supported from 1.0 framework on the other hand InvokeAsync is fairly newer and supports 2.0 framework onwards.
2. Begin Invoke returns IAsyncResult while InvokeAync is void.
3. MSDN says, Begin Invoke - Starts an asynchronous invocation of an XML Web service method using SOAP while InvokeAsync - Invokes the specified method asynchronously.Additonal information can be supplied by caller usin Begin Invoke.
4. InvokeAsync uses the thread from threadpool to resume, whilst Begin Invoke will use current host thread. (Not absoultely sure)
Tuesday, February 14, 2012 9:14 AMGot it.Thank you.