Deploying the Kshare Web Service XML

When you build an application, Visual Studio .NET deploys the ASP.NET Web service. However, in some cases, you need to deploy a Web service explicitly. For example, consider a situation in which you need to transfer the Web service from your development computer to an online server. In this case, you first need to create a virtual directory on the online server. To do this, perform the following steps:

  1. Run the Internet Services Manager from the Administrative Tools and expand the tree of the enabled services.
  2. Right-click on the Default Web Site node and select the New, Virtual Directory option, as shown in Figure.
  3. Creating a Virtual Directory.

    Creating a Virtual Directory.

  4. Clicking on the Virtual Directory option starts the Virtual Directory Creation Wizard, as shown in Figure
  5. The Virtual Directory Creation Wizard.

    The Virtual Directory Creation Wizard.

  6. Click on the Next button to start the wizard. The Virtual Directory Alias page is displayed, as shown in Figure.
  7. The Virtual Directory Alias Page.

    The Virtual Directory Alias Page.

  8. Enter an alias for your Web service and click on the Next button. The Web Site Content Directory page is displayed, as shown in Figure.
  9. The Web Site Content Directory Page.

    The Web Site Content Directory Page.

  10. Browse for the directory that contains the Web service files. This directory will be mapped to the virtual directory that you create; therefore, it should be marked as IIS Web application.
  11. Click on the Next button to display the Access Permissions page. In this page, do not change the default settings. The Access Permissions page is shown in Figure.
  12. The Access Permissions Page.

    The Access Permissions Page.

  13. Click on the Next button, and in the resulting screen, click on the Finish button to close the Virtual Directory Creation Wizard.

After you create the virtual directory, you need to copy the required files of the Web service to the directory that is mapped to the virtual directory. In addition, you need to create a subdirectory with the name Bin under the main directory. The Bin folder will contain the assemblies required for the Web service. The files that you need to copy to the main directory are discussed in the following list:

  • .asmx files. You need to copy these files to the directory that is mapped to a virtual directory. The .asmx files act as the base URLs for clients that call the Web services.
  • Web.config. This is an optional file that allows you to override and alter the default configuration settings for a Web application.
  • .disco file. This is another optional file that allows client applications to discover a Web service. Visual Studio does not generate the .disco file automatically; you need to create it.
  • Assemblies. When you compile and build your Web service, Visual Studio .NET creates the assemblies. However, these assemblies are different from the assemblies that are part of the .NET Framework. You need to copy the assemblies to the Bin folder.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

XML Topics