This documentation is archived and is not being maintained.

Deploying XML Web Services

Deploying an XML Web service involves copying the .asmx file and any assemblies used by the XML Web service, but not part of the Microsoft .NET Framework, to the Web server.

For example, suppose you have an XML Web service named StockServices. To deploy the XML Web service, you create a virtual directory on your Web server and place the XML Web service .asmx file in that directory. The virtual directory should also be an Internet Information Services (IIS) Web application, although it is not required. A typical deployment would have the following directory structure:

\Inetpub

     \Wwwroot

          \StockServices

               StockServices.asmx

           \Bin

               Assemblies used by your XML Web service
               that are not part of the Microsoft .NET Framework.

Items Published with an XML Web Service

When you publish an XML Web service, the following items are deployed to a Web server.

ItemDescription
Web application directoryActs as the root directory for your XML Web service. All the remaining files are placed within this directory.

This directory should be flagged as an Internet Information Services (IIS) Web application.

<MyXMLWebService>.asmx fileActs as the base URL for clients calling the XML Web service. The name of the file can be any valid file name.
<MyXMLWebService>.disco file(Optional) Acts as a discovery mechanism for the XML Web service. The .disco file is not automatically created for an XML Web service. For information on creating a discovery file for your XML Web service, see Enabling Discovery for an XML Web Service. The name of the file can be any valid file name.
Web.config file(Optional) If you need to override the default configuration settings, you can include a Web.config file. XML Web services use the configuration file to allow customization and extensibility of the system.

For example, you might supply an XML Web service–specific Web.config file if your XML Web service requires authentication, but other Web applications on the system do not.

\Bin directoryContains the binary files for the XML Web service. If your XML Web service class is not in the same file as the .asmx file, then the assembly containing the class must be in the \Bin directory.

See Also

Enabling Discovery for an XML Web Service | Configuration Options for XML Web Services Created Using ASP.NET | Building XML Web Services Using ASP.NET

Show: