Udostępnij za pośrednictwem


Creating Web Services in Managed Code

 Windows Communication Foundation Services and ADO.NET Data Services

You create Web services in managed code using the ASP.NET page framework. You start by creating an .asmx file. This file contains the WebService directive, which identifies the public class that implements the Web service logic. 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. ASP.NET handles the infrastructure to expose those methods as a Web service. For more information, see Code Model for Web Services in Managed Code.

To create Web services in managed code using Visual Studio, you need access to a Web server configured for developing ASP.NET applications. You develop Web services in managed code on a development server. By default, the development server is the computer on which you installed Visual Studio. Typically, you develop and build the project on a development server, and then deploy it to another server (the deployment server) that will host the Web service. However, if development occurs directly on the server that will host the Web service, the development server and deployment server are the same.

In This Section