之前在博客几个实例DemoWCF服务寄宿到控制到应用程序中,这篇来总结一下,经常使用的几种宿主的方式。

1.Self-Hosting

一个WCF服务可以寄宿在控制台应用程序或者WinForms application中。

1.1.长处

A.很easy的建立。把须要的配置都写在配置文件里。代码写的很少

B.很easy去调试,不用附加进程

C.支持全部的Bindings和传输协议

D.很灵活的去控制服务的生命周期通过打开和关闭方法去控制

1.2.缺点

A.仅仅有当服务宿主执行时,WCF服务才干够供client调用

B.须要自己定义代码

 2. Windows Service

一个windows service与其它的程序或者应用很的相似,仅仅只是windows service执行在后台,而且可以随着系统的启动而自己主动的启动。Windows Service不须要接口。

2.1.长处

A.一个Windows Service可以随着系统的执行自己主动的启动

B.一个Windows Service可以自己主动的重新启动或者当发生失败时可以自己主动的恢复

C.支持全部的Bindings和传输协议

2.2.缺点

A.须要自己定义代码去创建一个Windows Services

B.Wcf宿主须要部署在server上

C.在调试的时候,我们须要附加到进程里面

  3.IIS

直接把WCF服务寄宿到IIS中。

3.1.长处

A.不须要代码去寄宿WCF 服务。在IIS中,服务宿主直接在.SVC文件里。通过这个文件就能够实例化一个WCF服务。

B.自己主动传输信息,甚至当服务改变时,IIS自己主动发生改变,client不用终止。

3.2.缺点

A.于IIS5.1和6.0于,IIS只有执行HTTP合约

版权声明:本文博主原创文章,博客,未经同意不得转载。

Hosting WCF Service的更多相关文章

  1. WCF - Hosting WCF Service

    After creating a WCF service, the next step is to host it so that the client applications can consum ...

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

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

  3. 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 ...

  4. 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 ...

  5. Fixing common issues when hosting a .NET 4.0 WCF service in IIS 7

    http://sandrinodimattia.net/fixing-common-issues-when-hosting-a-net-4-0-wcf-service-in-iis-7/ Until ...

  6. Deploying an Internet Information Services-Hosted WCF Service

    Deploying an Internet Information Services-Hosted WCF Service .NET Framework 4   Other Versions .NET ...

  7. WCF - Consuming WCF Service

    WCF services allow other applications to access or consume them. A WCF service can be consumed by ma ...

  8. WCF Service Configuration Editor的使用

    原文:http://www.cnblogs.com/Ming8006/p/3772221.html 通过WCF Service Configuration Editor的配置修改Client端 参考 ...

  9. 探讨 : Host在IIS上的WCF Service的执行方式

    一个WCF请求由两个线程来完成 运行在IIS上的WCF service, 你可能会注意到一个比较有趣的现象. 当WCF service接收到一个请求时, 这个请求实际上会有两个线程在执行这个请求. 一 ...

随机推荐

  1. 【ALearning】第二章 Androidproject知识介绍

    本章介绍了主要的初步Androidproject成立了一个开发环境.为了Android意识的整体项目和理解.本章包含Android开发环境的搭建.第一Android工程Hello World与Andr ...

  2. android视频库Vitamio

    之前尝试自己解码视频,然后播放显示,虽然音视频都可以播放,但是实现不了音视频的同步,所以使用第三方的视频库Vitamio来实现视频播放器功能,这样自己只需要实现播放解码的制作不不要关心底层解码和显示问 ...

  3. LINUX专题之操作系统字符集

    原创作品,出自 "深蓝的blog" 博客,欢迎转载.转载时请务必注明下面出处,否则追究版权法律责任. 深蓝的blog: http://blog.csdn.net/huangyanl ...

  4. HTML表格标签的使用-<table>

    <html> <head> <title> 表格标签 </title> <!-- 标签名:table 定义一个表格 子标签:<caption ...

  5. 项目中那些事|ListView中嵌套ListView问题

    要在一个ListView中放入另一个ListView,也即在一个ListView的每个 item 中放入另外一个ListView.但刚开始的时候,会发现放入的子ListView会显示不完全(我这里只显 ...

  6. MySQL数据转移至MSSQL详解

    一.安装MySQL ODBC驱动 为MySQL安装Connector/ODBC驱动.在此需要注意的一点是Connector/ODBC驱动与MySQL Server的版本对应问题.   二.创建系统DS ...

  7. [欧拉回路] hdu 3018 Ant Trip

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3018 Ant Trip Time Limit: 2000/1000 MS (Java/Others) ...

  8. hdu5384(trie树)

    hdu5384 给定n个字符串Ai 给定m个字符串Bi 问所有的Bi在每个Ai中出现了多少次 很显然,对Bi建Trie图,然后每次用Ai去匹配的时候,不断查找当前匹配串的最长后缀,这样就能找到答案了 ...

  9. Struts 2 初学的复习巩固

    Q:使用Struts2 开发程序的基本步骤? A: 1)加载Struts2类库: 2)配置web.xml文件,定义核心Filter来拦截用户请求: 3)开发视图层页面,即JSP页面: 4)定义处理用户 ...

  10. ImageButton消除使用setImageDrawable造成的边框问题。

    使用ImageButton的时候,如果使用setBackgroundDrawable设置图片,会对可点击范围有影响,使用setImageDrawable方法设置图片,图片小的话,可以会有,这种有白色边 ...