Is it possible to create a C# web service which can be called asynchronously without the autogenerated client needing to provide a synchronisation via multithreading.
Yes, the auto-generated proxy always contains both synchronous and asynchronous versions of every method. For instance, if the server exposes a method called DoWork, the proxy will contain both a DoWork method and a DoWorkAsync method. When the Async version of the method completes it's work, the proxy raises a completed event, in this case DoWorkCompleted. The return value from the DoWork method will be included in the event args .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With