Troubleshooting

Creating a .NET Web Service

I’m having difficulties creating a basic Web service and am not sure where to begin.

If you’re having difficulties creating a basic Web service, keep in mind that you only need to employ two classes:

  • WebService

  • WebMethodAttribute

The WebService class is used to simply declare the Web service. It does not give a name to the Web service or tell the world that there is a new Web service. It is only a directive to allow the .NET framework to treat this set of code as a Web service.

The WebMethodAttribute class is used to identify the set of code that is reusable. Any set of code that is reusable must be public and used within an ASP.NET application.

In VB .NET a simple Web service can be created with the ...

Get Special Edition Using XSLT 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.