官术网_书友最值得收藏!

Chapter 3. Hosting and Configuration

In this chapter, we will cover:

  • Hosting a service in a console application
  • Hosting a service in Windows Service
  • Hosting a HTTP service with ASP.NET-compatible context
  • Hosting a non-HTTP service in IIS 7
  • Customizing IIS ServiceHost via ServiceHostFactory
  • Specifying a dedicated service instance for a singleton service
  • Hosting a service in WSS 3.0

Introduction

Service hosting and configuration is very important for building WCF services, especially at the service deployment stage. After developers complete the service development, we will need to deploy the service so as to make it available to all the client consumers. In the real world, there are various service deployment scenarios available, which will result in different deployment and configuration requirements on the service configuration or the hosting environment.

As an enhanced service development platform, WCF provides rich, built-in support on service hosting and configuration that can fulfill most of the existing deployment demands and requirements. For example, the most popular IIS hosting approach can provide high availability and stable service for local intranet or public internet-based deployment cases. The Windows service-hosting approach makes WCF service hosting easier to integrate with existing background scheduled tasks, and the self-hosting approach provides the most flexibility and customization points for service deployment in a production environment.

In this chapter, we will look at seven recipes on various WCF hosting and configuration scenarios. The recipes start with four typical hosting cases—self-hosting, Windows service hosting, IIS-based HTTP hosting, and IIS based non-HTTP hosting. This is followed by two customized service-hosting cases—including a custom ServiceHostFactory and a dedicated singleton-instance hosting. The last recipe demonstrates a more advanced WCF service-hosting scenario—Windows SharePoint Service hosting.

主站蜘蛛池模板: 蚌埠市| 镇宁| 资兴市| 麻城市| 龙游县| 沂水县| 石首市| 鱼台县| 永善县| 蓬安县| 乡宁县| 门头沟区| 新乡县| 焦作市| 子洲县| 醴陵市| 松原市| 崇信县| 马尔康县| 黑水县| 文成县| 历史| 礼泉县| 汉源县| 乌兰察布市| 麻城市| 澄迈县| 嘉荫县| 辰溪县| 通渭县| 鄂尔多斯市| 哈密市| 石楼县| 突泉县| 南安市| 西林县| 石泉县| 日喀则市| 河北省| 安泽县| 达州市|