Saturday, November 8, 2008

WCF hosting in different IIS versions

IIS hosting of WCF services provides benefits like:
  1. Can be deployed and managed like any other type of IIS application, including ASP.NET applications and ASMX.
  2. Provides process activation, health management, and recycling capabilities to increase the reliability of hosted applications.
  3. Like ASP.NET, WCF services hosted in ASP.NET can take advantage of the ASP.NET shared hosting model where multiple applications reside in a common worker process for improved server density and scalability.
  4. Uses the same dynamic compilation model as ASP.NET 2.0, which simplifies development and deployment of hosted services.
WCF services can be hosted on IIS versions 5.1, 6.0 and 7.0. Other than 7.0 other versions support only HTTP communications. The major differences are classified as:
  1. IIS 5.1: This environment is useful for the design and development of IIS-hosted applications that are later deployed on a server operating system such as Windows Server 2003.
  2. IIS 6.0: Provides an advanced process model that offers improved scalability, reliability, and application isolation. This environment is suitable for production deployment of WCF services that use HTTP communication exclusively.
  3. IIS 7.0: Provides the same advanced process model as IIS 6.0, but uses the Windows Process Activation Service (WAS)* to allow activation and network communication over protocols other than HTTP. This environment is suitable for the development of WCF services that communicate over any network protocol supported by WCF (including HTTP, net.tcp, net.pipe, and net.msmq).
* The Windows Process Activation Service (WAS) manages the activation and lifetime of the worker processes that contain applications that host Windows Communication Foundation (WCF) services. The WAS process model generalizes the IIS 6.0 process model for the HTTP server by removing the dependency on HTTP. This allows WCF services to use both HTTP and non-HTTP protocols, such as Net.TCP, in a hosting environment that supports message-based activation and offers the ability to host a large number of applications on a given machine.
The WAS process model provides several features that enable applications to be hosted in a way that is more robust, more manageable, and that uses resources efficiently:
  1. Message-based activation of applications and worker process applications start and stop dynamically in response to incoming work items that arrive using HTTP and non-HTTP network protocols.
  2. Robust application and worker process recycling to maintain the health of running applications.
  3. Centralized application configuration and management.
  4. Allows applications to take advantage of the IIS process model without requiring the deployment footprint of a full IIS installation.

1 comment:

Anonymous said...

Great post. Thanks for introducing WCF services in details. Now a days application hosting is more important to increase business productivity.