Hosting WCF Service


This blog explains little about different ways of hosting WCF service and their benefits

Getting Started

Hosting WCF service is very easy as developing. To consume WCF service by your client application, you must host the service somewhere to make it availability to in public. There are four ways available to host WCF service.

  1. IIS Hosting
  2. Self-Hosting
  3. WAS Hosting
  4. Windows Service Hosting

IIS Hosting

The way of hosting WCF Service is same as hosting ASP.NET Web page. IIS hosting offers process health monitoring, idle shutdown, process recycling, and many more features to facilitate a WCF service hosting. The main advantage of hosting WCF service in IIS is that the service activation is handled automatically.


Programmatically hosting WCF service is called self-hosting, this can be possible through managed code. In self-hosting developer can host using program like windows form, console application ets.

WAS Hosting

Before going to understand WAS Hosting, let I explain WAS. WAS stands for Windows Activation Service, Windows Activation service is a system service available with Windows vista and windows server 2008. It is available with IIS 7.0 and it is more powerful compared to IIS 6.0 because it supports Http, TCP and named pipes were IIS 6.0 supports only Http. It can be installed and configured separately.

WCF Service can be hosted in Window Activation Service , developer will get more advertence by hosting WCF service in WAS because of its valuable features like idle time management, support for HTTP and TCP protocol, common configuration system and process recycling feature.

Windows Service Hosting

For local system clients, it is best to host WCF service as a window service and this is known as Window Service Hosting. All the versions of Windows support this type of hosting and here, the Service Control Manager can control the process lifecycle of the WCF service.

Related Articles

  1. WCF Self Hosing
  2. WCF IIS Hosting


Hope you must get the idea of various ways of hosting WCF service


No comments:

Post a Comment