Before the advent of Web services, other technologies and architectures existed that allowed applications to remotely
call procedures exposed by other applications, typically using the TCP/IP protocol. You have undoubtedly heard of
Microsoft's version of this technology, called Component Object Model* (COM*), and subsequently Distributed COM*
Web services solve many of the problems common to DCOM. A Web service is a unit of code that publicly exposes its
functionality as a URL-addressable resource. As such, any client application that conforms to open Web standards
such as HTTP and the Simple Object Access Protocol (SOAP)\u2014the main messagef o r m a t t i n g protocol, as opposed to
HTTP, which is a messaget r a n s m i s s i o n protocol\u2014can call a Web service, initiate a procedure, and even retrieve data
in the form of an XML document. Thus, Web services take care of the two problems with DCOM and other distributed
This article shows you how to build and consume a basic ASP .NET Web service. It focuses on the steps required to build the Web service and client application that consumes it. For more theoretical or in-depth information about Web services, see the list of resources at the end of this article.
This article assumes no prior knowledge of Web services, Visual Studio .NET*, or Visual Basic .NET*. The Web
Service is built using Visual Studio .NET, although the IDE is not required to build .NET Web services. You could write
the code and compile it using the Visual Basic compiler from the command line. However, this article assumes you are
using Visual Studio .NET and thus makes no accommodations for other situations. Finally, you will need access to the
Northwind* database shipped with Microsoft SQL Server* and the Microsoft Data Engine* (MSDE).
7. Click the design surface and press F4 to access the Web service page's Propertiesw i n d o w .
8. Set the Name property of Service1 to ProductsService.
9. In Solution Explorer, right-click the Service1.asmx file, select Rename, and rename the file Products.asmxto
In the next step you will add anI m p o r t s statement that lets you use shorthand notation when accessing classes in
the imported namespace. A namespace is simply a logical grouping of related .NET types, such as classes, interfaces,
enums, structures, and so forth. This makes it easier to work with the Base Class Library and also prevents type name
If strCategoryID <> "" Then
cmd.CommandText &= " where
CategoryID = " & strCategoryID
Now bringing you back...
Does that email address look wrong? Try again with a different email.