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
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
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access