Code Model for Web Services


A Web service created using Visual Studio .NET has two parts :

  1. The first part is a file with extension .asmx , which serves as the addressable entry point for the Web service.

  2. The second part is the code behind file with extension .asmx.cs ( .asmx.vb for VB.NET), which provides the implementations for the methods that the Web service provides.

The WebService directive present in the .asmx file specifies the public class that implements the Web service logic. In ASP.NET, the .asmx file references code in pre-compiled assemblies, a code-behind file, or the code contained in the .asmx file itself. The Web service class contains one or more public methods for exposure in a Web service. These Web service methods are prefaced with the WebMethod attribute. By default, Visual Studio .NET uses code-behind files ”for instance, Service1.asmx.cs or Service1.asmx.vb ”when you develop a Web service with the ASP.NET Web service project template.



.NET Security and Cryptography
.NET Security and Cryptography
ISBN: 013100851X
EAN: 2147483647
Year: 2003
Pages: 126

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net