O'Reilly logo

.NET Programming: A Practical Guide Using C# by Pradeep Tapadiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ASP.NET Web Services

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.

Providing 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" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required