Hosting the HelloWorld WCF service
In the previous chapter, we hosted our HelloWorldService
in ASP.NET Development Server. In addition to this we have several other options for hosting a WCF service. In this section, we will explore them one by one.
Hosting the service in a managed application
We can create a .NET managed application and host a WCF service inside the application. The hosting application can be a command-line application, a Windows Forms application, or a web application. This hosting method gives you full control over the lifetime of the WCF service. It is very easy to debug and deploy, and supports all bindings and transports. The drawback of this hosting method is that you have to start the hosting application manually and it has only limited support for high availability, easy manageability, robustness, recoverability, versioning, and deployment scenarios.
Hosting the service in a console application
Following are the steps to host HelloWorldService
in a command-line application...