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

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.

主站蜘蛛池模板: 天峨县| 巴青县| 墨江| 唐山市| 民乐县| 福建省| 彩票| 芜湖县| 筠连县| 滦平县| 忻城县| 宜川县| 鄂伦春自治旗| 平果县| 宝应县| 祥云县| 遵化市| 崇礼县| 浙江省| 常熟市| 金门县| 禹城市| 绥江县| 徐州市| 房产| 乌海市| 吉隆县| 双柏县| 潜江市| 确山县| 泰安市| 临沂市| 洪洞县| 武乡县| 香港 | 嘉兴市| 辰溪县| 聂荣县| 安阳县| 崇文区| 云梦县|