O'Reilly logo

Professional WCF 4: Windows Communication Foundation with .NET 4 by Johann Grabner, Fabio Cozzolino, Kurt Claeys, Pablo Cibraro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14. Hosting

WHAT'S IN THIS CHAPTER?

  • Hosting options overview

  • Hosting in IIS\WAS

  • Managing and tracking endpoints with Windows Server AppFabric

  • Forwarding services

  • Cloud-based hosting

WCF is a great and powerful platform to develop service. But after you have developed your service, how can you make it available to the world? You need a host process to run your service. The host process creates the various configuration settings that enable the service execution. It prepares the environment, creates the endpoints, starts the listening processes, and manages the service lifecycle.

The role of the host process is very important, and should be chosen carefully. There are two main options for hosting your service:

  • Self-hosting

    • Console application

    • Windows application

    • Windows services

  • IIS

    • IIS 6 only for Http protocol

    • Windows Activation Service (WAS)

    • Windows Server AppFabric

The self-hosting option allows you to host a service directly in your application. If you want to enable a Windows application to receive messages, or if you want to enable communication between different processes, you can use this option. This makes your application totally independent from the configuration of the machine. You don't need to install third-party software to host your services. Therefore, you have to manage the service lifetime. For example, if the host process stops unexpectedly, your service becomes unavailable.

Using IIS is a robust and efficient hosting option. This is the best choice if you are in a distribute ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required