16.3 Deployment

Deploying web services is very similar to deploying web pages. The .asmx file must be located in a virtual directory exposed by IIS so that it is accessible to a browser on the Internet. If you have a .disco file for the web service (described in the previous section), then this file should also be in the application virtual directory. This allows the web service to be discovered and also allows proxies to be created by consuming applications. Both of these concepts will be described in Chapter 17.

Also, just as with web pages, if there is a code-behind class that implements the web service, the assembly file (i.e., the dll) must be located in the \bin directory immediately beneath the virtual directory containing the .asmx file.

If the application requires a web.config file (described fully in Chapter 20), then this file too should be copied to the application virtual directory.

Figure 16-13 shows a typical directory structure on a production web server for a web service called csStockTicker.

Figure 16-13. Typical deployment directory structure
figs/pan2_1613.gif

Referring to Figure 16-13, if a virtual directory was defined on the web server called StockTicker, which was mapped to the directory called csStockTicker, then the URL for referring to the .asmx file would be:

http://YourDomain.com/StockTicker/csStockTicker.asmx


Programming ASP. NET
Programming ASP.NET 3.5
ISBN: 0596529562
EAN: 2147483647
Year: 2003
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net