Hosting Options for WCF Services

The first lab of this class used the WcfTestClient.exe application as a makeshift host/client. The WCF Service
Library project provides an App.config file, which the test client uses. This is quite handy when you wish to
test new operational contracts quickly while building your services.

A production-level WCF service must be placed within a dedicated host. A WCF service can be hosted within
the following: Any .NET executable (console program, Windows Forms program, WPF program, and so on).
A Windows service, which is just another form of an executable. However, Windows services typically do
not require any user interaction. An IIS virtual directory.

A WCF service can also be hosted by the Vista-specific Windows Activation Service (WAS). This class will
not examine WAS. Consult the .NET Framework SDK documentation for details.

Strictly speaking, the
real host of a WCF service is the application domain of the executable you have created.
Recall that an AppDomain is a partition within a Win32 process. Under IIS, the AppDomain is within the
ASP.NET worker process.

A given AppDomain can hold contain any number of
ServiceHost objects (described next). An AppDomain
can contain a single ServiceHost object as this type can expose multiple WCF service endpoints for the same
service.  However, be aware that a given ServiceHost object can only expose a specific type of WCF service.
If a single AppDomain must expose multiple WCF services, you will need to make use of multiple
ServiceHost objects.
WCF Tutorial Summary
Table of Contents
Copyright (c) 2008.  Intertech, Inc. All Rights Reserved.  This information is to be used exclusively as an
online learning aid.  Any attempts to copy, reproduce, or use for training is strictly prohibited.
Courseware
Training Resources
Tutorials
Services