Book Image

Visual Studio 2013 and .NET 4.5 Expert Cookbook

Book Image

Visual Studio 2013 and .NET 4.5 Expert Cookbook

Overview of this book

Table of Contents (14 chapters)
Visual Studio 2013 and .NET 4.5 Expert Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Hosting a WCF service in different hosting environments


Hosting a service is an important part of any service. Coming from web services, WCF exposes more relevant APIs to handle different kinds of hosting environments. A WCF service can be hosted virtually anywhere, starting from a simple Console Application, a Windows Service, IIS, or even other hosting services such as Windows Activation Service. After the service is hosted on an environment, the service endpoint for a particular service gets exposed. When the host process runs, WCF will be available using the configured endpoints.

Any .NET application runs using a Windows process. Inside a process, you can host multiple .NET application domains. Each application domain logically separates the execution environment from another. WCF requires ServiceHost to host a worker process inside the application domain. Similarly, each application domain can host multiple worker processes. Each application represents service host-to-host multiple endpoints...