WCF Hosting options


Windows Communication Foundation was official released with .NET 3.0. For those people who are doing connected, distributed systems or are in any way interested in communication aspects of systems, this ought to be a God-send. WCF basically rolled all the different Microsoft messaging formats into one, making it extremely easy to architect the communication layer of simple to complex applications. 

At its core, WCF is a mechanism that facilitates communication between processes – either on the same machine or separate machines. Part of the confusion I had when trying to understand WCF was the almost limitless ways WCF can accomplish this. This article will briefly present the hosting options, hosting being one of the most important variables that increases WCF the number of ways in which it can be used.

Unlike web services and dotnet remoting, WCF provides more options for hosting. It combines old hosting options with new one like hosting on WAS. WCF application can also be hosted in following ways:

a. Self hosting using WinForms applications or Console applications

Advantages: easy to use, easy to deploy, easy to debug.

Disadvantages: the service is available only when the application is running, IIS has some extra features available by default (high availability, easy manageability, robustness, recoverability, versioning, and deployment)

b. Windows service

Advantages: automatic starting, recovery (win services have built in support to restart services when failures occur), security (win services run under a specific account), manageability, support for all bindings and transports

Disadvantages: Deployment(everybody who had ever worked with win services must have had at least once problems with installing, logging, moving from development to live etc)

c. IIS & WAS using Web applications (ASP.NET) and and WAS on Windows Vista or Windows Server

Advantages: IIS built in security, the host process is launched automatically upon the first client request, IIS manages the life cycle of the host process

Disadvantages: you can only use HTTP


Every scenario has it specific advantages and it is important to choose the right way to host your processes. For example you shouldn’t consider self-hosting for enterprise scenarios. Self-hosting is suitable during the development or demonstration phases of your enterprise project. Another suitable example where you would self-host your services is when you want applications on a user desktop to communicate with each other or in a peer-to-peer scenario.

 In general, you can apply a “Why not IIS?” approach. What do we mean by that? IIS provides the best match in terms of features, in particular in scenarios where your services are exposing key business functionality on which multiple systems rely. When you choose IIS and then have to choose between IIS 6.0 and IIS 7.0, you should obviously choose the latter because of the new activation features. In scenarios where you need interprocess communication, both WinForms and console applications are viable options. Windows services are essentially the only alternative to IIS and will typically be used when you are building a server product or when you need advanced control over the activation and lifetime of your services.

 The WCF programming model is agnostic to where it is running, so switching to a different host later is always possible and doesn’t mean you have to change your service implementation. Typically, you’ll start with a self-hosted scenario in a console application to test-drive and prototype your services.

Finally, there’s another very important peculiarity of what does Cialis that brings it so high above its alternatives. It is the only med that is available in two versions – one intended for use on as-needed basis and one intended for daily use. As you might know, Viagra and Levitra only come in the latter of these two forms and should be consumed shortly before expected sexual activity to ensure best effect. Daily Cialis, in its turn, contains low doses of Tadalafil, which allows to build its concentration up in your system gradually over time and maintain it on acceptable levels, which, consequently, makes it possible for you to enjoy sex at any moment without having to time it.

By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.