Header Ads

WCF Hosting Options


WCF gives facility to developer to host their WCF service on following hosting options:

1. IIS
2. Console Application
3. Windows Application
4. Windows Service
5. Self Hosting

1.IIS:

Developer can host WCF service on IIS. We need to create virtual directory in IIS and create SVC file for exposing WCF service. After doing that, IIS will take care of availability of service. Whenever you will start your machine, WCF service will be available to your customer. You don't required to start any program.

IIS also gives some in-built functionality like web gardening, web farming, recycling etc.

2.Console application:

Developer can host WCF service on Console application. This option mainly used for testing purpose. You must need to start Console application for service availability. If anybody will close console application then service will not be available to any customer for consumption.

3.Windows Application:

Developer can host WCF service on Windows application. This option also mainly used for testing purpose. You must need to start Windows application for service availability. If anybody will close windows application then service will not be available to any customer for consumption.

4.Windows Service:

Developer can also host WCF service in Windows Service. Windows service runs in background. This option is best option to host WCF service if IIS is not available on the server. You can set windows service startup property to Automatic. Windows service will start as soon as machine start so you don't need to start any application for service availability.

5.Self hosting:

WCF also provides facility to host itself. This used for only testing purpose on developer machine. You can select WCF service project and mark it as startup project. After running the project, Visual Studio IDE will host the WCF service in itself.

No comments:

Powered by Blogger.