Web Services Stumbling Blocks

Microsoft has done a great deal to ease the process of building Web Services, especially in Visual Studio .NET. But let’s focus on using just the .NET framework tools here.

First you’ll take a look at a simple Web Service. Then we’ll identify areas where you might have problems. Listings 13.113.4 serve as examples of the code that you will need to get started.

Listing 13.1. ASMX Code (C#)
<%@ WebService Language="c#" Codebehind="Service1.asmx.cs" 
Class="chap_13_c. TimeService" %%> 
Listing 13.2. Simple Web Service (C#)
 using System; using System.Web.Services; namespace chap_13_c { //Create a class and inherit the WebService functionality public class TimeService : System.Web.Services.WebService { //Constructor ...

Get Debugging ASP.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.