Sunday, June 13, 2010

Different Hosting models in WCF

This post is to consolidate the different hosting models available for WCF and what is new in .NET 4.0

The following are the different hosting models available for wcf services

I. Self hosting in Managed application

. In a Console application or windows application or WPF application

Scenario & advantages/disadvantages:

Generally whole testing the services.
Not used for production deployment.


II. Windows Services
. WCF services can be hosted in Managed Windows Services .

Scenario & advantages/disadvantages:

Good for long running services
Can be used as a production deployment option.
Life time is controlled by service control manager
Not message activated, means service-host needs to be created in the app domain in order to server the incoming requests for wcf services.

III. Internet Information Server
. Most robust option for production deployment.
. Message based activation supported. IIS takes care of having the servicehost created in the process/app-domain
. Process recycling is supported.
. IIS 5, IIS 6 support only http protocol
. IIS 7 supports all http and tcp protocols.

IV. WAS (Windows Activation Services)
. Provides Message based activation, process recycling etc (what IIS provided to http based wcf services) for all tcp based wcf services along with http protocol also.
. IIS is not required.

No comments:

Post a Comment