Apply Your Knowledge


7.1. Calling a Web Service Asynchronously

Depending on the speed of your Internet connection, you may have noticed that the Web service client applications you constructed earlier in Step by Step 7.1, “freeze” when you invoke the Web service. That's because by default these applications use synchronous methods to communicate with the Web service, waiting for the SOAP response before allowing any other code to execute. But the proxy classes constructed by .NET include asynchronous methods as well. In this exercise, you'll learn how to call a Web service asynchronously.

Estimated time: 30 minutes

Create a new Visual C# .NET Windows application in the Visual Studio .NET IDE.
Right-click the References folder ...

Get MCAD/MCSD.NET Training Guide (Exam 70-316): Developing and Implementing Windows®-Based Applications with Microsoft® Visual C#™ .NET and Microsoft® Visual Studio® .NET now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.