|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
IIS 7.0 and WAS Hosting
In the Vista timeframe, on Windows "Longhorn" Server machines, you can host your WCF services with the Windows Activation Service (WAS). WAS is a process activation service installed with IIS 7.0 that decouples the activation architecture from IIS in order to support non-HTTP protocols such as named pipes, TCP, and MSMQ. Like IIS 6.0, WAS also provides features for idle-time management, health monitoring, process recycling, and management tools for configuring application pools among other things.
In this section I'll explain how WAS hosting works, show you how the hosting architecture compares to IIS 6.0 hosting, and provide you with some tips for getting started with WAS. WAS Hosting Architecture IIS 7.0 introduces some architectural changes necessary to expand support for named pipes, TCP, and MSMQ protocols. The new architecture relies on protocol listeners, listener adapters, and protocol handlers to process requests.
To support this new architecture there are two services:
Table 2: Services supporting WCF hosting with the WAS.
Regardless of protocol, the service model handles all requests in a consistent manner, but WAS provides a message-based activation mechanism like IIS 6.0 to increase the overall reliability and scalability for requests over any protocol. Enabling WAS You'll need to perform a few steps to configure IIS 7.0 and WAS before you can successfully host WCF services over any protocol. As you would with IIS 6.0, you'll first have to make sure the machine has IIS 7.0 and WAS installed. With these Windows components installed you can configure WAS for the protocols you want to support for each Web site. IIS provides a new command-line utility to configure Web sites: appcmd.exe. HTTP protocol is supported by default, but with this utility you can enable support for named pipes, TCP, or MSMQ for any Web site or application directory. The following illustrates enabling named pipes, TCP, and MSMQ support for the default Web site:
After executing these commands, IIS updates the configuration file for WAS, applicationHost.config, with new <binding> entries for the Web site. IIS nests site configuration inside the <system.applicationHost> section as shown here:
This section governs what protocols the Web site and WCF services can support. Put another way, services can only expose endpoints that use service model bindings matching the supported protocols for the application.Choosing the Right Hosting Environment As I mentioned at the beginning of this article, choosing a hosting environment for your services is something that is largely driven by your operating platform and choice of protocol. Now that you've had a chance to explore the different hosting environments, you can probably guess that the best possible hosting environment would be WAS for its rich set of features and protocol support. Unfortunately, WAS is only available on Windows Vista or Windows "Longhorn" Server machines. Table 3 summarizes the hosting options available to you on each operating platform, including client and server platforms. Table 3: A summary of hosting options based on operating platform and communication protocol.
Based on this summary, you will likely make one of these choices for your production services on each server platform:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Michèle Leroux Bustamante is Chief Architect of IDesign Inc., Microsoft Regional Director for San Diego, Microsoft MVP for XML Web Services, and a BEA Technical Director. At IDesign, Michele provides training, mentoring, and high-end architecture consulting services focusing on WCF, CardSpace, Web services, interoperability, scalable and secure architecture design for .NET, and globalization architecture. She is a member of the International .NET Speakers Association (INETA), a frequent conference presenter, conference chair of SDs Web Services track, and is frequently published in several major technology journals. Michele is also on the Board of Directors for IASA (International Association of Software Architects), and Program Advisor to UCSD Extension. Her book, Learning Windows Communication Foundation (OReilly) is scheduled to release in late 2006. Read her blog at www.thatindigogirl.com.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|