The Internet is evolving from a collection of isolated Web sites and applications into a general communication bus for distributed applications. Recall from Chapter 1 that Microsoft and many other companies believe that the components of the distributed applications will communicate with each other using Web services. A Web service (more specifically, XML Web service) is a service that can be programmatically accessed over the Web. It is based on industry standards such as SOAP and WSDL.
ASP.NET makes it easy to create and test Web services.
Let's define a simple Web service class that defines a method to add two numbers. Here is the code:
<%@ WebService Language="C#" Class="MyCompany.MyCalculator" ...