Building a .NET Web Service

As mentioned, a Web service is a class that optionally inherits from WebService. As such, the class can implement any number of interfaces and, as long as you don’t need to directly access common ASP.NET objects, can also inherit from any other .NET Framework or user-defined class. The definition of the class must necessarily be coded in an .asmx file. The file is made available to potential clients through a Web server virtual directory and is accessed through a URL. Any client that can issue HTTP commands can connect to the Web service unless security settings restrict the client’s access to the service.

What happens after a client points to the URL is the focus of the rest of this chapter. Let’s start by analyzing ...

Get Applied XML Programming for Microsoft® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.