I have a Windows Forms application which makes calls to web services via proxies generated with SvcUtil from WSDL descriptors. These calls can last for minutes, and during this time I don’t want the client app to ‘freeze out’. What do I have to do to achieve this? I guess something Threading related, but I’m not sure how to manage return values and parameters in that case.
I have a Windows Forms application which makes calls to web services via proxies
Share
I’d go for a background worker.
Set the RunWorkerCompleted event and DoWork, run it and when you get your result in DoWork, set the event argument to your result (e.Result).
The examples aren’t tested, but your IDE should help you out. Also you will have to resolve the BackgroundWorker, or just add
More information here: http://msdn.microsoft.com/en-us/library/cc221403(v=vs.95).aspx
Hope it helps!