This documentation is archived and is not being maintained.

ASP.NET Web Service Template (C++) 

Use the ASP.NET Web Service template to author an XML Web service that can be consumed by other Web services or applications on a network. For more information, see XML Web Services in Managed Code.


You must have:

  • A computer with Internet Information Services (IIS) installed.

  • If you want to use FrontPage Server Extensions as your access method, the server extensions must also be installed on that computer.

  • You must have the correct Web permissions settings for your application.

Files and References Added by the Template

The template automatically adds the essential project references and files to use as a starting point for your application:

  • References to these .NET Framework namespaces:

    • System.EnterpriseServices - Contains classes that provide infrastructure for enterprise applications.

    • System.XML - Contains classes that provide standards-based support for processing XML.

    • System.Web.Services - Contains classes that enable you to build and use XML Web services, programmable entities residing on a Web server and exposed via standard Internet protocols.

    • System.Web - Contains classes and interfaces that enable browser/server communication.

    • System.Data - Contains classes that constitute the ADO.NET architecture, which is the primary data access method for managed applications.

    • System - Contains fundamental classes and base classes that define commonly used values and reference data types, events and event handlers, interfaces, attributes, and processing exceptions.

    • mscorlib - The assembly DLL that provides .NET Framework support.

  • Source files:

    • Service (.cpp file) - The main source file and entry point into the application that Visual Studio created for you. Identifies the project .dll file and the project namespace. Provide your own code in this file.

    • Service (.asmx file) - A text file that references managed classes that encapsulate the functionality of the XML Web service.

    • AssemblyInfo.cpp - The file that contains information (that is, attributes, files, resources, types, versioning information, signing information, and so on) for modifying the project's assembly metadata. For more information, see Assembly Concepts.

    • Stdafx.cpp - Used to build a precompiled header file named Win32.pch and a precompiled types file named StdAfx.obj.

  • Header files:

    • Service (.h file) - The main include file for the project, which contains all declarations, global symbols, and #include directives for other header files.

    • Service (.resx file) - An XML resource file whose BuildAction property is set to Embedded Resource.

    • Stdafx.h - Used to build a precompiled header file named Win32.pch and a precompiled types file named StdAfx.obj.

    • resource.h - A generated include file for app.rc.

  • Resource files:

    • app.rc - The resource script file of a program.

    • app.ico -The icon file of a program.

  • ReadMe.txt - A file describing each file in your project using the actual filenames created by the template.

  • Web.config – A file with application-specific settings. For more information, see Application Configuration Files.

  • Global.asax – A file with code for responding to application-level events raised by ASP.NET. For more information, see Global.asax Syntax.

See Also