Export (0) Print
Expand All

How to: Add an XML Web Service to an Existing Web Project in Managed Code 

You can add an XML Web service to an existing Web project in Visual Studio.

To add a new XML Web service to an existing Web project

  1. In Solution Explorer, select the project to which you want to add an XML Web service.

  2. On the Web Site menu, click Add New Item. Alternatively, right-click the project name and point to Add New Item.

    The Add New Item dialog appears.

  3. Select Web Service, choose a name for your web service, and choose Add to add the XML Web service to your project.

    Visual Studio automatically creates the necessary files and references to support an XML Web service. When completed, the IDE displays the .asmx file in Design view. For more information, see ASP.NET XML Web Service Basics.

    You can also add an existing XML Web service to an existing Web project in Visual Studio. This process is limited to XML Web services written in the same programming language as your existing Web project. For more information, see How to: Add Existing Items to a Project.

To add an existing XML Web service to an existing Web project

  1. In Solution Explorer, select the project to which you want to add an existing XML Web service.

  2. On the Project menu, select Add Existing Item. Alternatively, right-click the project name, point to Add and then click Add Existing Item. The Add Existing Item dialog box appears.

  3. In the Files of type list, click Web Files.

  4. Select the .asmx file for the XML Web service you want to add.

  5. Click Open to add the XML Web service to your project.

    Visual Studio adds the .asmx file and its associated code-behind file to your project. For more information, see ASP.NET XML Web Service Basics.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft