I tried to do async webservice(Helloworld) call using windows application 3.5 using delegate AsyncCallback but the problem was I could not get any BeginInvoke(BeginHelloworld) or EndInvoke(EndHelloworld) methods in intellisense.I did use proper namespace and required interface ,IAsyncResult but It gives me complie time error.what exactly I require to do, to write the code like .net winform 1.1.

Thank you,

6 Years
Discussion Span
Last Post by Unhnd_Exception

Heres one way I send a web service async.

This doesn't actually call the web service async but calls another method async that calls the web service sync.

The delegate and sub

Private Delegate Sub SendMessageDelegate(ByVal Messages As List(Of Byte()))

Private Sub SendMessages(ByVal Messages As List(Of Byte()))
'The web method called sync in here.
End Sub

When I'm calling it from another form

Dim SendAsyn As New SendMessageDelegate(AddressOf SendMessages)
 Dim IasyncResult As IAsyncResult = SendAsyn.BeginInvoke(Messages, Nothing, Nothing)

If I call the web service async I usually just use the built in async method of the web service.

For example:

Sm as new SendMailService

and say SendMailService has a method named SendMail

You can call it async by


you can then use the SendMailCompleted Method to handle when its finished.


You should declare your web service

private withevents Sm as new SendMailService

to use the SendMailCompleted Event.

This article has been dead for over six months. Start a new discussion instead.
Be sure to adhere to our posting rules.