After creating a WCF service, the next step is to host it so that the client applications can consume it. This is known as WCF service hosting. A WCF service can be hosted by using any of the four ways given below:

在创建wcf服务后,下一个步骤就是托管该服务,确保客户端应用可以使用它。这也被称为wcf服务托管。wcf服务可以使用下面4种中的任一一种方式进行托管

  • IIS Hosting - IIS stands for Internet Information Services. Its working model is similar to that of ASP.NET while hosting a WCF service. The best feature of IIS hosting is that the service activation is processed automatically. IIS hosting also offers process health monitoring, idle shutdown, process recycling, and many more features to facilitate a WCF service hosting.

  • Self-Hosting - When a WCF service is hosted in a managed application, it is known as self-hosting. It requires a developer to write the requisite coding for ServiceHost initialization. In self-hosting, a WCF service can be hosted in a variety of applications like Console application, Windows form, etc.

  • WAS Hosting - Hosting a WCF service in Windows Activation Service (WAS) is most advantageous because of its features such as process recycling, idle time management, common configuration system, and support for HTTP, TCP, etc.

  • Windows Service Hosting - For local system clients, it is best to host WCF service as a window service and this is known as Window Service Hosting. All the versions of Windows support this type of hosting and here, the Service Control Manager can control the process lifecycle of the WCF service.

IIS托管:互联网信息服务,在托管wcf服务的时候,它的工作模式类似于ASP.NET。IIS托管的最好的特性是:服务激活是自动处理的。IIS托管同样提供进程安全监视,空闲挂断,进程复用,以及许多其他的功能来促进wcf服务托管。

自托管:当一个wcf服务托管在一个托管应用上时,被称为自托管。这就要求开发人员为服务托管初始化编写必要的代码。在自托管中,wcf服务可以托管在许多应用上。比如控制台应用,winform应用等。

WAS托管:将wcf服务托管在windows激活服务上是最有利的,因为它包含如下功能:进程复用,空闲时间管理,公共配置系统,并且支持HTTP和TCP等

windows服务托管:对于本地系统客户端而言,将wcf服务作为windows服务来托管是最好的托管方式。所有版本的windows操作系统都支持这种类型的托管,服务控制管理器可以控制wcf服务的进程的生命周期。

WCF - Hosting WCF Service的更多相关文章

  1. WCF - Hosting WCF Service 四种托管方式

    https://www.tutorialspoint.com/wcf/wcf_hosting_service.htm After creating a WCF service, the next st ...

  2. Hosting Multiple Service Implementations On The Same Port With WCF

    Hosting Multiple Service Implementations On The Same Port With WCF Recently I have been playing arou ...

  3. WCF - Versus Web Service

    There are some major differences that exist between WCF and a Web service which are listed below. 这里 ...

  4. wcf和web service的区别

    1.WebService:严格来说是行业标准,不是技术,使用XML扩展标记语言来表示数据(这个是夸语言和平台的关键).微软的Web服务实现称为ASP.NET Web Service.它使用Soap简单 ...

  5. WCF和Web Service的 区(guan)别(xi)

    参考文献:http://social.microsoft.com/Forums/zh-CN/c06420d1-69ba-4aa6-abe5-242e3213b68f/wcf-webservice 之前 ...

  6. WCF与 Web Service的区别是什么?各自的优点在哪里呢?

    这是很多.NET开发人员容易搞错的问题.面试的时候也经常遇到,初学者也很难分快速弄明白 Web service: .net技术中其实就指ASP.NET Web Service,用的时间比较长,微软其实 ...

  7. 跟我一起学WCF(13)——WCF系列总结

    引言 WCF是微软为了实现SOA的框架,它是对微乳之前多种分布式技术的继承和扩展,这些技术包括Enterprise Service..NET Remoting.XML Web Service.MSMQ ...

  8. Learing WCF Chapter1 WCF Services

    WCF ServicesWCF services are the new distributed boundary in an enterprise application—with an empha ...

  9. Learning WCF Chapter1 Hosting a Service in IIS

    How messages reach a service endpoint is a matter of protocols and hosting. IIS can host services ov ...

随机推荐

  1. ### MATLAB - CUDA

    MATLAB下使用CUDA. #@author: gr #@date: 2014-04-08 #@email: forgerui@gmail.com 一. Matlab & C 1. 概念 M ...

  2. 03链栈_LinkStack--(栈与队列)

    #include "stdio.h" #include "stdlib.h" #include "io.h" #include " ...

  3. 05_XML的解析_01_dom4j 解析

    [简述] Xml文件出了给开发者看,更多情况使用程序读取xml文件里的内容,这叫做xml解析. 根据解析方式分为:DOM解析 和 SAX解析 [解析工具] (一). 使用DOM解析原理的工具: 1.J ...

  4. Visualsvn Server的搭建

    最近做项目在用svn,对svn有个初步了解,今天利用一点时间在本地配置了一个svn的服务端.整个过程分为以下几步: ①下载Visualsvn Server并且进行安装. ②安装好以后,在Visuals ...

  5. OpenJudge/Poj 2013 Symmetric Order

    1.链接地址: http://bailian.openjudge.cn/practice/2013 http://poj.org/problem?id=2013 2.题目: Symmetric Ord ...

  6. 【nodemailer】 之邮件附件

    nodemailer 续 之前对nodemailer做了一个简单的了解,这篇文章主要研究一下如何添加附加文件 测试代码 //Created by yyrdl on 2015/10/2. var nod ...

  7. Linux中的简单命令

    history:打印你输过的命令      1.用户在shell中输入的命令会自动保存到内存缓冲区      2.在退出shell的时候,内存中的数据会刷新到磁盘文件:~/.bash_history ...

  8. 判断UserAgent是否来自微信

    iso: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko ...

  9. head 头标签(转发)

    HTML head 头标签 paddingme | 04 Oct 2014 HTML head 头部分的标签.元素有很多,涉及到浏览器对网页的渲染,SEO 等等,而各个浏览器内核以及各个国内浏览器厂商 ...

  10. 关于.NET技术前途问题的讨论

    我去年曾经在论坛发起过关于.NET技术前途问题这个话题的讨论,也引起了很多同行和朋友的回复,时间过去大半年,自己也有了一些新的理解.本文的目的就是将其中一些精彩的观点整理出来并谈谈自己的观点. 引子 ...